对象过滤

eg:

var temp=[{key:'0001',value:0},{key:'0001',value:0},{key:'0002',value:1}]

temp.filter(item=>item.value!=0)或者temp.filter(({value})=>value!=0)

posted @ 2019-11-13 10:13  简单就好zyx  阅读(417)  评论(0编辑  收藏  举报