我有一个 json 数组存储在变量中,格式如下:
{"info":
[ {"typeid": "877", "recid": "10", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "877", "recid": "11", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "459", "recid": "3", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "459", "recid": "4", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "456", "recid": "5", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "456", "recid": "6", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"}
]}
我想反转 info 的内部 JSON 数组。像这样
{"info":
[ {"typeid": "456", "recid": "6", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "456", "recid": "5", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "459", "recid": "4", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "459", "recid": "3", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "877", "recid": "11", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"},
{"typeid": "877", "recid": "10", "repeaterid": "0", "pageid": "26966", "maxrecords": "1"}
]}
我怎样才能做到这一点。