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?

0

2 Answers 2

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);
Sign up to request clarification or add additional context in comments.

1 Comment

May want to escape your quotes in the strJson definition.
5
var obj = Ext.decode(jsonstr);

1 Comment

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)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.