I have an array of objects... (actually I'm not sure what I have but it looks like this)
list =
{
"ZIG": [
"CSK",
"DKR",
"CSK",
"YNA",
"CSK"
],
"ZKG": [
"YNA"
],
"ZND": [
"NIM",
"DKR",
"AJY"
],
"ZNE": [
"PHE",
"PER"
]
}
And I'm looking for a way to end up with
list =
{
"ZIG": [
"DKR",
"YNA",
"CSK"
],
"ZKG": [
"YNA"
],
"ZND": [
"NIM",
"DKR",
"AJY"
],
"ZNE": [
"PHE",
"PER"
]
}
I was able to remove most of the duplicates by using uniq but there are still some duplicates