$(document).ready(function () {
$.ajax({
type: 'POST',
url: 'http:abc/public/aditya/eJewelry/get_store_details.php?store_id=udb1001',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
alert(data);
}
});
});
I am sending request to that url and getting responce:-
[{
"id": "22",
"storename": "Unique Diamond Boutique",
"email": "[email protected]",
"storeimage_ipad": "",
"website": "www.uniquediamondboutique.com",
"store_code": "udb1001",
"street_address": "157 E New England Avenue\nSuite 202\n",
"country": "US",
"zipcode": "32789",
"state": "FL",
"city": "Winter Park",
"email_sales": "[email protected]",
"personal_phone": "407-312-6768",
"company_phone": "407-218-5958",
"image": "store_22.png",
"status": "1",
"paypal_email": "[email protected]",
"moreAddress": [{
"street_address": "123 main st",
"city": "MIAMI",
"state": "FL",
"zipcode": "33106",
"country": "",
"website": "",
"id": "68",
"company_phone": "",
"company_email": ""
}, {
"street_address": "640 Brevard Ave",
"city": "Cocoa Beach",
"state": "FL",
"zipcode": "32922",
"country": "",
"website": " ",
"id": "69",
"company_phone": "407-123-5678",
"company_email": " "
}]
}]
When i use alert(data) i am getting "[object Object]";
How can i use that data to get the id, country,email_sales..etc.
I am using alert(data.id) but getting empty alert. If you have any idea kindly let me know.