Parse JSON in Ext JS 4 or JavaScript
16,011
Solution 1
Have a look at http://docs.sencha.com/ext-js/4-1/#!/api/Ext.JSON. There you find how you can parse JSON with Ext JS 4.
var strJson = '{"value": [{"idProductCategoryAttributeValue":43,"value":"7","sortOrder":0}]}';
var obj = Ext.JSON.decode(strJson);
Solution 2
var obj = Ext.decode(jsonstr);
Author by
anupkumar
I am a web developer from India.Working on open source frameworks and cms. I have a development experience with the quality coding style maintaining correct standards.
Updated on June 09, 2022Comments
-
anupkumar almost 2 years
I have this type of JSON:
{"value":[{"idProductCategoryAttributeValue":43,"value":"7","sortOrder":0}]}
I want the individual parameters values like. How do I parse this JSON string in Ext JS 4 or in simple JavaScript?
-
Jordan Kasper over 11 yearsMay want to escape your quotes in the
strJson
definition. -
sra over 11 yearsThis is just a shorthand for Ext.JSON.decode(). The answer is also in a lower quality then the first one (no text, no reference)