0

I am trying to get the data from a JSONP proxy in sencha touch 2.3(I am using sencha architect 3 to develop). I was successfully able to place jsonp call and get the data back. But I am not getting how to separate every single element of json response. Here is my json Response:-

{"data":[{   "PLANTNUM": "1557",   "ROUTEID": "90625",   "DELIVERYDATE": "2014-02-12T00:00:00-06:00",   "MESCOD": "15",   "MESFCT": "DLV",   "ORIGID": "HH",      "JMSTIME": "02/11/2014 00:11:21",   }],"success" : true}

Here is my function

 success: function(response){
console.log(response);
    var temp=response.data.PLANTNUM;
    console.log(temp);
}

I can see below in my console:-

console

Here is my jsonP request

Ext.data.JsonP.request({
url: 'http://localhost:12608',
callbackKey: 'cbfn',
params: {
    method: 'sapout',
    type: 'sap', 
    ordnum: '1034986850'
}

I tried using response.PLANTNUM but that is also not working. It always shows undefined Can anyone help me out here.

Thanks

1 Answer 1

2

data is an array, so you want response.data[0].PLATINUM.

Sign up to request clarification or add additional context in comments.

1 Comment

Oops..missed that...Thanks a lot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.