I have a JSON string.
var obj = {"cities":[{"city_name":"abc"},{"city_name":"xyz"}]}
How can I get the values for the key city_name
, using JavaScript or JQuery, and get another array like:
["abc","xyz"]
I tried many ways but couldn't figure out.