Imagine I am with an array of objects in this format
"err": [
{
"chk" : true,
"name": "test"
},
{
"chk" :true
"post": "test"
}
]
Is there a way to organize it like this instead:
"err": [
{
"post": "test"
"name": "test"
}
]
I attempted
arr.filter(obj => delete obj.chk);
Although it successfully removes the chk
property, how can I merge the two objects together?