> This is a working sample, but I would like to use a dynamic variable > "selected_country" within the each loop at the end. Like: > data.selected_country. However, if I use this it takes it literally > and thus does not find "selected_country" in the JSON. It would be > nice to find and only return US, UK, etc. from the JSON.
Instead of data.US, just say data[selected_country] and it will pick the right one.