Json Decoding Issue


I am few weak in js / ajax / json. However, I have a string as ajax response through firebug console that is:


is there any way to receive the value of this string that is "Order%5Bitem_list%5D%5B%5D"

Or actually, I do not understand about the string?

Thanks in advance if someone help to understand and handle this string.

That looks like a URL string, not a JSON. If you want to make a JSON out of it, you first need to URL decode it, then use that data.

I don’t know if Yii includes a class to decode it, but if it doesn’t you can try the urldecode function.

It will give you something like


With that string, you can do whatever you want. If you wanted to decode a JSON, I guess you wanted to make an array out of it. In which case, you can use the explode function, and separate it with the "&" character, resulting in something like





Depends on what you need.

it is javascript built in function, you can use this :


study for detail information:


thanks ASPtoYiiDev and Mubashar Iqbal to help me. I’ll try by myself, ask if I face any difficulties.

Hi I need to use the value 5,6. How to extract these values. Could you help me?