This is my array
var CountryList = [{ name: Canada, value: 1 },
{ name: USA, value: 2 }]
This is the operation I am using right now
var filterStr = nextProps.Country.value == "1" ? 'Canada' : 'USA';
Now I want to use the array CountryList in the above code using to check whether Canada or USA is selected. Is it done using map?
If it's USA I want to populate States of USA in another Dropdown. If it's Canada Then States of Canada. SO according to the Selection from this array I want to populate the States. I need to check the selected country . ie, I want to get the country name.
How to do that?