这是json[{"ulog_id":5,"ulog_time":2015,"user_name":"ceshi123"},{"ulog_id":4,"ulog_time":2018,"user_name":"ceshi123"},{"ulog_id":3,"ulog_time":2017,"user_name":"ceshi123"},{"ulog_id":2,"ulog_time":2015,"user_name":"ceshi123"},{"ulog_id":1,"ulog_time":2015,"user_name":"ceshi123"}]如何取出所有ulog_time为2015的数据或者其他指定条件的数据。
2 回答
哈士奇WWW
TA贡献1799条经验 获得超6个赞
constjson=[{},{},{},{}]constresult=json.filter(item=>item.ulog_time===2015)
添加回答
举报
0/150
提交
取消