JSON对象如下。需要根据用户输入找到值。输入看起来像"data.location.type"
, 或"data.location.items[1].address.street"
。可以在 JQuery 中完成吗?
{
"data": {
"location": {
"type": "List",
"count": 1,
"items": [
{
"id": 1,
"type": "S",
"address": {
"street": "123 Main St",
"city": "New York",
"state": "NY"
}
},
{
"id": 2,
"type": "S",
"address": {
"street": "1323 South St",
"city": "New York",
"state": "NY"
}
}
]
}
}
}