Remove object from array of objects

前端 未结 9 1486
滥情空心
滥情空心 2021-01-31 15:28

I have an array of objects:

[{\"value\":\"14\",\"label\":\"7\"},{\"value\":\"14\",\"label\":\"7\"},{\"value\":\"18\",\"label\":\"7\"}]

How I ca

9条回答
  •  佛祖请我去吃肉
    2021-01-31 15:59

    If you dont want to mutate your array simply use filter method , Array.prototype.filter()

    array.filter((i)=> i != "b");

提交回复
热议问题