JSON parsing in Ext JS 4 or JavaScript

I have this type of JSON :

{"value":[{"idProductCategoryAttributeValue":43,"value":"7","sortOrder":0}]}

I need the values ​​of the individual parameters. How to parse this JSON string in Ext JS 4 or in plain JavaScript?

+5
source share
2 answers

Take a look at http://docs.sencha.com/ext-js/4-1/#!/api/Ext.JSON . There you will learn how you can parse JSON with Ext JS 4.

var strJson = '{"value": [{"idProductCategoryAttributeValue":43,"value":"7","sortOrder":0}]}';
var obj = Ext.JSON.decode(strJson);
+10
source
var obj = Ext.decode(jsonstr);
+5
source

All Articles