Reading JSON Data with ExtJS

If this post helps you, click an ad

ExtJS provides the decode() function to make reading JSON data easy.

For example, take the following JSON packet:

{“results”:1,”rows”:[{"PaintingName":"Fran"}]}

This JSON can be read as follows:

var paintingJSON = Ext.util.JSON.decode(responseObject.responseText.trim());
var paintingName = paintingJSON.rows[0].PaintingName;
console.log(paintingName);

Tags: , , , , ,

2 Responses to “Reading JSON Data with ExtJS”

  1. Neto Says:

    I was needing this to continue a project, thanks!

  2. Joey Says:

    Glad it helped you :)

Leave a Reply