I have an application which returns JSONObject like this:
Result:
{
status: "200",
data: {
exposedItemsList: [
{
type: "process",
itemID: "25.22982aaf-aff7-4e03-9c7c-a8475bf48354",
itemReference: "/25.22982aaf-aff7-4e03-9c7c-a8475bf48354",
processAppID: "2066.18beb803-e14e-4f6f-9d08-a807091aea7e",
snapshotID: "2064.c0d236be-b5c8-463a-a38d-7267af836918",
snapshotName: "SP20",
snapshotCreatedOn: "2012-08-22T09:28:22Z",
display: "Access Request", }
]
}
}
I have used below function to get Json:
$.get("url of my application", function (data) {
alert("Data Loaded: " + data);
;
});
This works and returns entire JSONObject. However, I want to access “exposedItemsList” JSONArray and elements within it.
I have tried
alert("Data Loaded: " + data.exposedItemsList[0].type);
but id did not work…
Pls advise.
Thanks in advance
I could resolve this issue by adding