auth0/node-odata-parser

Error when trying to reference a sub-object

Opened this issue · 2 comments

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?

Also I have same problem! Waiting for solution

Shouldn't you use the / (forward slash) as the select property path delimiter? Parsing $select=object/subobject yields the expected output:

{
  "$select": [
    "object/subobject"
  ]
}