I am trying to filter unique object from the places Array inside the list Array, but not able to get the exact solution to find the unique place name, please find the array data below=>
"list":[
{
"id":1,
"uID": 1
"places":[
{
"name":"USA"
},
{
"name":"USA"
},
{
"name":"GER"
}
]
},
{
"id":2,
"uID":2
"places":[
{
"name":"USA"
},
{
"name":"GER"
},
{
"name":"GER"
}
]
}
]
The Expected output should be like this =>
"list":[
{
"id":1,
"uID": 1
"places":[
{
"name":"USA"
},
{
"name":"GER"
}
]
},
{
"id":2,
"uID":2
"places":[
{
"name":"USA"
},
{
"name":"GER"
}
]
}
]
Appreciate your help.