我需要使用具有特定对象ID的Json数据填充html模板。
假设我的json数据位于名为mydata.json的文件中,如下所示:
[
{
"ID": "001",
"title": "This is my title",
"content": "This is my content"
},
{
"ID": "002",
"title": "This is my title",
"content": "This is my content"
},
{
"ID": "003",
"title": "This is my title",
"content": "This is my content"
}
]
我如何才能加载该文件并仅用对象ID 002中的数据填充html模板?
萧十郎
相关分类