My JSON:
json_filter = {"CO": "blah"}
I am trying to access the member ‘CO’ by a string value. However, the result is undefined.
var selectedState = $(this).val();
// Selected 'CO'
console.log(json_filter.selectedState);
I was thinking eval() might work, but eval() == the devil 🙂 Is there a better way to do this?
Like this: