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,738
  • 21
  • 105
  • 131
anupkumar
  • 357
  • 4
  • 14
  • 28

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,150
  • 1
  • 18
  • 32
5
var obj = Ext.decode(jsonstr);
Vlad
  • 3,626
  • 16
  • 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