I have a question about searching the JSON for the specific information. For example, I have this JSON file:
{
"people": {
"person": [
{
"name": "Peter",
"age": 43,
"sex": "male"
}, {
"name": "Zara",
"age": 65,
"sex": "female"
}
]
}
}
我的问题是,如何通过jQuery找到特定的人并显示该人的年龄? 例如,我想在JSON中搜索一个名为Peter的人,当我找到一个匹配项时,我想显示有关该匹配项的附加信息(在本例中是关于名为Peter的人),例如人的年龄.