Error when trying to reference a sub-object
Opened this issue · 2 comments
mangvlad commented
I have this JSON:
{
"test": "123",
"object": { "subobject": "567", "another": "xyz"}
}
trying to get:
{
"object": {"subobject": "567"}
}
My query is: '$select=object.subobject'
But parser.parse('$select=object.subobject') gives me the following error: [TypeError: Object subobject has no method 'unshift'].
Any suggestion for how/where I can fix it?
eturan commented
Also I have same problem! Waiting for solution
prantlf commented
Shouldn't you use the /
(forward slash) as the select property path delimiter? Parsing $select=object/subobject
yields the expected output:
{
"$select": [
"object/subobject"
]
}