RT
for example:
const demo = [
{ a:1, b:4 },
{ a:2, b:4 },
{ a:3, b:5 },
]
now you want to drop {acode 1, bazaar 4}
or {acode 2, bazaar 4}
in demo, just leave one of them and return a new array. Is there any quick way for ES6 to get back to a new array?
the result after Filter is
const demo = [
{ a:1, b:4 },
{ a:3, b:5 },
]
or
const demo = [
{ a:2, b:4 },
{ a:3, b:5 },
]