I have the following Json
var initialdata = [
{
"type": "Feature",
"properties": {
"Region": "US",
"SubRegion": "US-1",
"SiteID": "234"
},
"geometry": {
"type": "Point"
}
},
{
"type": "Feature",
"properties": {
"Region": "US",
"SubRegion": "US-1",
"SiteID": "235"
},
"geometry": {
"type": "Point"
}
},
{
"type": "Feature",
"properties": {
"Region": "US",
"SubRegion": "US-2",
"SiteID": "234"
},
"geometry": {
"type": "Point"
}
},
{
"type": "Feature",
"properties": {
"Region": "UK",
"SubRegion": "UKK",
"SiteID": "121"
},
"geometry": {
"type": "Point"
}
},
{
"type": "Feature",
"properties": {
"Region": "UK",
"SubRegion": "UKK",
"SiteID": "121"
},
"geometry": {
"type": "Point"
}
}
]
I have the dropdown based on the keys of initialdata.properties for example I have the dropdown like below
Region
SubRegion
SiteID
If user choose Region dropdown means, I need the following output as a list for user selection with out duplication
US
UK
How can I achieve this?
If anyone have any idea please share it with me