[ { "province":"广东", "item":[ { "ID":"1", "province_id":"7", "title":"广东小吃 好吃真好吃", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" }, { "ID":"2", "province_id":"7", "title":"广东炒饭 香喷喷爱上", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" } ] }, { "province":"江西", "item":[ { "ID":"1", "province_id":"8", "title":"江西小吃 好吃不上火", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" }, { "ID":"2", "province_id":"8", "title":"江西炒饭 香喷喷", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" } ] }, { "province":"广西", "item":[ { "ID":"1", "province_id":"9", "title":"优质酱卤牛肉", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" }, { "ID":"2", "province_id":"9", "title":"农家自制豆制品豆干豆腐", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" } ] } ]
如上面是ajax获取到的json数据,我想要找到title="炒饭"(模糊搜索)所在的对象(符合条件的对象可能不止一个,只要符合都找出来),结果为:
{ "ID":"2", "province_id":"7", "title":"广东炒饭 香喷喷爱上", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" }, { "ID":"2", "province_id":"8", "title":"江西炒饭 香喷喷", "imgUrl":"http://xxxx/images/item/7_001.jpg", "link":"https://xxxxxxxxx" }
js白痴一枚,求大神指导,我能无耻的求一份demo吗?再不济也请告诉我一下如何实现的思路好么?还有两天,做不出来就完蛋了,跪求!
付费偷看金额在0.1-10元之间
一周热门 更多>