后台获取到的ajax的JSON数组,原始数据
[
{"CostTime": "310", "FromStation": "上海"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "310", "FromStation": "上海"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "310", "FromStation": "上海"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "310", "FromStation": "上海"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "310", "FromStation": "上海"},
{"CostTime": "310", "FromStation": "上海"},
{"CostTime": "336", "FromStation": "北京"}
]
把FromStation为北京的数据过滤后生成新的数据
[
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "336", "FromStation": "北京"},
{"CostTime": "336", "FromStation": "北京"}
]
用JS或者JQ过滤具体方式是怎么样的。谢谢各位大牛指点下!
慕田峪7331174
慕姐8265434
神不在的星期二
相关分类