method to extract the store (nested) data as a json object
method to extract the store (nested) data as a json object
Is there an extjs api method that would allow me to extract the data from a store/model into a json object. It should take into account nested data.
Probably it shouldn't be too hard to write, but I thought of asking first (and, yes, I did look in the docs but I didn't find anything that fits 100% what I want to do).
I knew about the Ext.encode method. You can't call Ext.encode(<someStore>) because the store has so many data members and methods and so on. As a matter of fact I tried it on a simple store and I got this:
Uncaught RangeError: Maximum call stack size exceeded
What I am looking for is a method that extracts the data from the store and takes into account the associations (if any), then it converts it to a json object which I can pass to the Ext.encode method.