Skip to main content

Posts

Showing posts with the label results

ExtJS grab JSON result

I'm generating JSON response from PHP witch looks like this: { done:'1', options: [{ message:'Example message'},{message:'This is the 2nd example message'}]} I want to grab these results using ExtJS. This is what I have so far: Ext.Ajax.request({ loadMask: true, url: 'myfile.php', params: {id: "1"} }); What do I have to write next to get the json results like this: var mymessages = jsonData.options; And mymessages should contain Example message and This is the 2nd example message. Thank you. Source: Tips4all