Hi all
I have this data response:
"{
"d" : {
"results": [
{
"__metadata": {
"uri": "http://win-bd86268lvbk/CRMDEVELOPMENT/XRMServices/2011/OrganizationData.svc/BusinessUnitSet(guid'69e04798-1576-e611-80e4-308d99276d29')", "type": "Microsoft.Crm.Sdk.Data.Services.BusinessUnit"
}, "Address1_StateOrProvince": "Sindh", "Address1_Line1": "Gulshan e Iqbal", "Address1_City": "Karachi", "BusinessUnitId": "69e04798-15768d99276d29", "Address1_PostalCode": "75300", "Address1_Country": "Pakistan"
}
]
}
}"
How do parse it using JavaScript.?
I tried these options but fail to get values:
var retrieved = JSON.parse(req.responseText).d,
retrievedRecord = retrieved.results.Address1_Line1,
City = retrieved.results[0].Address1_City,
Country = retrieved.results[1].Address1_Country;
Only the highlighted one is working which gives me the above response.
Thank You
*This post is locked for comments