How to filter JSON data using Javascript or jQuery?(如何使用Javascript或jQuery过滤JSON数据?)
This my JSON data:(这是我的JSON数据:)
[{"name":"Lenovo Thinkpad 41A4298","website":"google"},
{"name":"Lenovo Thinkpad 41A2222","website":"google"},
{"name":"Lenovo Thinkpad 41Awww33","website":"yahoo"},
{"name":"Lenovo Thinkpad 41A424448","website":"google"},
{"name":"Lenovo Thinkpad 41A429rr8","website":"ebay"},
{"name":"Lenovo Thinkpad 41A429ff8","website":"ebay"},
{"name":"Lenovo Thinkpad 41A429ss8","website":"rediff"},
{"name":"Lenovo Thinkpad 41A429sg8","website":"yahoo"}]
JavaScript:(JavaScript的:)
obj1 = JSON.parse(jsondata);
now I only want name and website data which is contain website is equal to "yahoo"(现在我只想要包含网站的名称和网站数据等于“雅虎”)
ask by Me7888 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…