I resotred to writing this function:
function transformData(results) {
let rows=[];
for(let i of results) {
for (let j of i.data) {
let node={};
for (let k of Object.keys(j.row[0])) {
node[k]=j.row[0][k];
}
rows.push(node);
}
}
return rows;
}
On Thursday, August 27, 2015 at 1:58:00 PM UTC+2, Aris Alexis wrote:
>
> Why don't they return nodes normal JSON objects and instead this
> complicated to parse structure which makes it difficult not to use a
> driver? I wanted to just use http client which is possible of course but
> parsing needs weird functions to extract just nodes with properties from a
> query.
>
> "columns" : [ "n" ],
> "data" : [ {
> "row" : [ {
> "name" : "My Node"
> } ]
>
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.