If I have a ajax call:
$.ajax({
url: url,
dataType: \'json\',
data: data,
success: function(json_data){
//What\'s the efficient way to extract the JS
A JSON string gets parsed into a JavaScript object/array. So you can access the values like you access any object property, array element:
var name = json_data.contact[0].name;
var addresses = json_data.contact[0].address;
Do access the values inside each address, you can iterate over the array:
for(var i = addresses.length; i--;) {
var address = addresses[i];
// address.city
// address.street
// etc
}
If you have not so much experience with JavaScript, I suggest to read this guide.