I have a form in which zipcode is a field. I'm trying to pull related information about that zipcode from a web service database to be inserted into a hidden field before the form is submitted. The call URL is http://muzak-dealers.heroku.com/dea...26F777D-EA30-4F15-B956-648662E34F17&callback= so 28031 would change based on the user's input. Out of what is returned from this URL I need the value for ia_or_oa. This is an example of what is returned: ({"_id":"4da5c6d3b5d2ac56ac002d6b","city":"CORNELIUS","ia_or_oa":"O","name":"MUZAK-MIDATLANTIC-CHARLOTTE","number":"432828","state":"NC","zip":"28031"}) Code (markup):
You will get the value by this way: variable=({"_id":"4da5c6d3b5d2ac56ac002d6b","city":"CORNELIUS","ia_or_oa":"O","name":"MUZAK-MIDATLANTIC-CHARLOTTE","number":"432828","state":"NC","zip":"28031"}) alert(variable.ia_or_oa) Code (markup):