Thursday, 8 August 2013

AJAX success callback JSON undefined

AJAX success callback JSON undefined

Here is the JSON returned from my php:
{
"approvalSource":[
{"role_name":"role_1","approval_req_id":"3"},
{"role_name":"role_2","approval_req_id":"2"}
],
"doc_source":[
{"document_name":"testDoc","doc_req_id":"2"}
]
}
How come alert(JSON.stringify(data.doc_source)); returns undefined?

No comments:

Post a Comment