我想知道我们是否能够做这样的事情。
var joinedJSON;
$.get("server.json?action=type&type=image", function(json) {joinedJSON +=json ; }
$.get("server.json?action=type&type=jpg", function(json) {joinedJSON +=json ; }
$.get("server.json?action=type&type=png", function(json) {joinedJSON +=json ; }
$.get("server.json?action=type&type=tiff", function(json) {joinedJSON +=json ; }
每一份请求都会为我们提供这样的初等人物数据:
[
{
"href": "bf051e8675b11c72eec781e855593589a086d2295378b96a8b7269c31b8fa673.user.file",
"title": "Привет Мир.jpg",
"user_name": "[email protected]",
"modified": "2012-01-16 07:24:11",
"is_public": 0,
"size": 65516
},
{
"href": "abd01be9a0830579d6366e48fc0c48d4c7cc350d80719843ca84c782346626f6.user.file",
"title": "",
"user_name": "[email protected]",
"modified": "2012-01-16 07:24:19",
"is_public": 0,
"size": 89782
},
{
"href": "0a27fd3b563b2877c3a072648e0f7c2a57539f3aba4ce688c7774eca6b70774e.user.file",
"title": "Привет Мир 2.jpg",
"user_name": "[email protected]",
"modified": "2012-01-16 07:24:29",
"is_public": 1,
"size": 58574
}
]
考虑到某些项目可能重复(C++的教材),我们能否获得一个很长的阵列?