Hi there,
I am trying to avoid parsing results returning from n1ql on your node.js SDK.
I am running a query that looks like this:
SELECT id, child.id FROM users;
I am getting a “duplicate id field” error from n1ql. The next fixes it
SELECT id, child.id as child_id FROM users;
But this returns the result in a flat json. That is not the proper construction of the data and I wish to have the json returned as:
{
id: …
child: {
id: …
}
}
I think that without this, you are giving the developers a world of pain as you virtually forcing them to cancel the DB architecture they chose. Is there any way to achieve this without mapping the query and the result and reverse engineer the result into a proper structure?
Thanks