我已经向 freebase API 发出请求,查询是:
{
"id" : "/m/01f8mn",
"key" : [{
"namespace" : "/wikipedia/en_id",
"value" : null
}],
"key" : [{
"namespace" : "/authority/mobygames/game",
"value" : null
}]
}
我从 Freebase 得到了答案:
{
"code": "/api/status/ok",
"result": {
"id": "/m/01f8mn",
"key": [{
"namespace": "/wikipedia/en_id",
"value": "213502"
}],
"ns0:key": [{
"namespace": "/authority/mobygames/game",
"value": "prince-of-persia"
}],
"ns1:key": [{
"namespace": "/authority/giantbomb/game",
"value": "61-2561"
}]
},
"status": "200 OK",
"transaction_id": "cache;cache03.p01.sjc1:8101;2012-05-20T18:37:04Z;0060"
}
如您所见,结果中有一个“命名空间前缀”键(“ns0:key”、“ns1:key”)
问题是:如何使用 Javascript 对象处理这个问题?任何人都可以帮忙吗?