PDA

View Full Version : Why store.insert does not work with correct json?



vicvolk
3 Mar 2013, 6:25 AM
Hello, guys! Please help, if you can. The problem is I'm using store.insert(0,Ext.create('GridModel',res.responseText)) where res.responseText is json looking like {"id":"53","id_obj":"73168","id_order":"53","attr_73173_":"some value"}. But instead of adding a correct row to the grid I see only an empty row. Mysteriously if I put that very json inside insert method, I get what is expected. So, my question is what I'm doing wrong?

Many thanks!

vicvolk
3 Mar 2013, 6:42 AM
Ext.decode came to help. But still weird that JSON.stringify(eval("(" + myjsonstring + ")")) did not help at all.