How to remove objects properties which values are empty string
for same key? For example, here I want to remove division
key from object.
const data= [
{
"id": "1",
"status": "Y",
"role": "any",
"division": "",
"name" : "test"
},
{
"id": "2",
"status": "N",
"role": "admin",
"division": "",
"name" : ""
},
{
"id": "3",
"status": "N",
"role": "test",
"division": "",
"name" : "any"
}
]