Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse JSON in Ext JS 4 or JavaScript [duplicate]

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?

like image 710
anupkumar Avatar asked Feb 07 '13 16:02

anupkumar


2 Answers

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);
like image 53
devOp Avatar answered Oct 19 '22 02:10

devOp


var obj = Ext.decode(jsonstr);
like image 35
Vlad Avatar answered Oct 19 '22 03:10

Vlad