I need assistance in filtering out unique place names from the list Array's places Array. Below is an example of the array data=>
"list":[
{
"id":1,
"uID": 1
"places":[
{
"name":"USA"
},
{
"name":"USA"
},
{
"name":"GER"
}
]
},
{
"id":2,
"uID":2
"places":[
{
"name":"USA"
},
{
"name":"GER"
},
{
"name":"GER"
}
]
}
]
The desired output should look like this =>
"list":[
{
"id": 1,
"uID": 1
"places":[
{
"name: USA"
},
{
"name: GER"
}
]
},
{
"id: 2,
"uID":2
"places":[
{
"name: USA"
},
{
"name: GER"
}
]
}
]
Your help with this is greatly appreciated.