我从服务器收到如下 JSON:
{"0":{"0":"image1.jpg","1":"texthere","2":"0"},"1":{"0":"image66.jpg","1":"texthere","2":"1"},"2":{"0":"image12.jpg","1":"texthere","2":"2"},"3":{"0":"image44.jpg","1":"texthere","2":"3"},"4":{"0":"image34.jpg","1":"texthere","2":"4"},"5":{"0":"image33.jpg","1":"texthere","2":"5"},"6":{"0":"image21.jpg","1":"texthere","2":"6"},"7":{"0":"image32.jpg","1":"texthere","2":"7"},"8":{"0":"image13.jpg","1":"texthere","2":"8"},"9":{"0":"image11.jpg","1":"texthere","2":"9"},"10":{"0":"image03.jpg","1":"texthere","2":"10"},"length":"12"}
编写此代码的开发人员使用JSON_FORCE_OBJECT作为 PHP 中 json_encode 方法的参数。
在 JavaScript 中是否有任何“魔法”(即,不是自定义函数)将此结构转换为多维数组?
我想要类似的东西:
[["image1.jpg","texthere","2"],["image66.jpg","texthere","1"]]...
免责声明: - 我正在寻找本机实现(不是 JQuery);- PHP 最终可以更改(如果需要);
任何帮助表示赞赏,在此先感谢。