I have an array of objects
{
"name":"DLF Shop",
"merchant_code":"EM499751e",
"address":"Link Rd, Dhaka 1205, Bangladesh",
"longitude":90.3937913,
"latitude":23.7456808,
"mother_shop_slug":"test-qa-26f7d03d",
"shop_type":"regular",
"key_personnel":[
{
"name":"",
"designation":"",
"phone_no":"",
"email":""
}
],
"category_head":[
{
"username":""
}
],
"bdm":[
{
"username":""
}
],
"kam":[
{
"username":""
}
],
"vm":[
{
"username":""
}
],
"organisation_type":"small",
"is_mother_shop":false,
"is_delivery_hero_allowed":false,
"is_cod_allowed":false
}
I want to filter out all the empty arrays in this object. So, after filtering in the newly created object there will be no empty arrays or any empty key in this object.