【发布时间】:2013-12-06 09:06:37
【问题描述】:
我有一个如下的json
"facet_counts": {
"facet_pivot": {
"title,host,content,anchor,id": [
{
"field": "title",
"value": "biglobe",
"count": 192
}
]
}}
通常我会像这样解析它:
var json = JSON.parse(xhr.responseText);
var field = json.facet_counts.facet_pivot.title,host,content,anchor,id[0].field;
但这是错误的。
你能告诉我如何解析属性“title,host,content,anchor,id”
【问题讨论】:
标签: javascript jquery json parsing