PDA

View Full Version : storing complex (nested) JSON from Neo4j graph database in an Extjs grid



dcomus
30 May 2015, 10:48 AM
I am attempting to dynamically create a grid as discussed here:

http://marcusschiesser.de/2013/12/21/dynamically-changing-the-structure-of-a-grid-in-extjs-4-2/

My problem is how to store JSON data returned from the Neo4j graph database in a data grid. Unlike the JSON examples in the above URL, the returned JSON from neo4j is as follows:

var jsonNeo4j = [
{"results":[{"columns":["n.name","d.name"],"data":[{"row":["C","D1"]},{"row":["B","D1"]}]}],"errors":[]}
];

So, the JSON data is in a different form, where the columns are in a separate area from the record content and the record content just lists the data values (i.e., they are not preceded by the field (column) names; the order of the data values imply the column associations). Can this kind of JSON format be used in an extjs store or do I need to first convert it to another format programmatically?

Thanks.