【发布时间】:2013-12-30 20:34:19
【问题描述】:
我正在尝试在数组中选择和显示特定的 JSON 数据。数据如下所示:
{ "thingys" : [
{
"type" : "thingy1",
"text" : "this is thingy1"
},
{
"type" : "thingy2",
"text" : "this is thingy2"
},
{
"type" : "thingy3",
"text" : "this is thingy3"
}
]}
我使用的是 json2html,我通常会使用类似的东西
{"tag":"div","html":"${thingys.text}"}
这很好,但我希望能够指定我想要 ${thingys.text} 其中 ${thingys.type} == "thingy3"。我该怎么做呢?
【问题讨论】: