jquery如何解析遍历这个对象数组
[{"id":"1","uid":"1","name":"","title":"OneThink1.0\u6b63\u5f0f\u7248\u53d1\u5e03","c...
[
{
"id": "1",
"uid": "1",
"name": "",
"title": "OneThink1.0\u6b63\u5f0f\u7248\u53d1\u5e03",
"category_id": "2",
"description": "\u5927\u5bb6\u671f\u5f85\u7684OneThink\u6b63\u5f0f\u7248\u53d1\u5e03",
"root": "0",
"pid": "0",
"model_id": "2",
"type": "2",
"position": "0",
"link_id": "0",
"cover_id": "1",
}
]
一定是Jquery哦,不是js 展开
{
"id": "1",
"uid": "1",
"name": "",
"title": "OneThink1.0\u6b63\u5f0f\u7248\u53d1\u5e03",
"category_id": "2",
"description": "\u5927\u5bb6\u671f\u5f85\u7684OneThink\u6b63\u5f0f\u7248\u53d1\u5e03",
"root": "0",
"pid": "0",
"model_id": "2",
"type": "2",
"position": "0",
"link_id": "0",
"cover_id": "1",
}
]
一定是Jquery哦,不是js 展开
1个回答
推荐于2016-11-09
展开全部
一定是Jquery哦,不是js
哇哈哈哈哈看你这句话,就知道你是个菜鸟
而且是个只知道用jquery的菜鸟
var arr = [
{
"id": "1",
"uid": "1",
"name": "",
"title": "OneThink1.0\u6b63\u5f0f\u7248\u53d1\u5e03",
"category_id": "2",
"description": "\u5927\u5bb6\u671f\u5f85\u7684OneThink\u6b63\u5f0f\u7248\u53d1\u5e03",
"root": "0",
"pid": "0",
"model_id": "2",
"type": "2",
"position": "0",
"link_id": "0",
"cover_id": "1",
}
];
$(arr).each(function(i,dom){
for(var k in dom){
console.log(k + ": " + eval("dom." + k));
}
});
追问
不行啊,得不到我想要的东西,我需要type的值
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询