I'm trying to filter everything inside 'items' with 'name': "", without losing structure and values of fieldLabel and placeholder. Below is my current object:
result: {
"fieldLabel": "foo",
"placeholder": "foo",
"items": [
{
"name": "foobar"
},
"name": ""
},
{
"name": ""
}
]
}
I want the object to look like this after filtering:
result: {
"fieldLabel": "foo",
"placeholder": "foo",
"items": [
{
"name": "foobar"
},
]
}