Closed. This question needs
How do you filter an array of key: objects where the value you filter by is in the object?
CodePudding user response:
you can do this:
array.filter((item)=>{return item.someKey==='valueYouWant'})
in your example you can do something like this:
const filtered=array.filter((item)=>{return item.categoryId<22})