5

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?

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
anupkumar
  • 357
  • 4
  • 14
  • 27

2 Answers2

11

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);
devOp
  • 3,140
  • 1
  • 16
  • 32
5
var obj = Ext.decode(jsonstr);
Vlad
  • 3,558
  • 15
  • 14
  • This is just a shorthand for Ext.JSON.decode(). The answer is also in a lower quality then the first one (no text, no reference) – sra Feb 08 '13 at 07:43