-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
While implementing the parent operator in my .Net Jsonata port, I stumbled upon the following test in the suite. It says that applying the query
Account.Order.Product.[`Product Name`, %.OrderID]
to the Invoice dataset should result in a flat array,
[
"Bowler Hat",
"order103",
"Trilby hat",
"order103",
"Bowler Hat",
"order104",
"Cloak",
"order104"
]which indeed it does: https://try.jsonata.org/3IY-yuZkE
But why? Isn't the braces here are the explicit array constructor? Consider changing the query to one without parent operator, e.g.:
Account.Order.Product.[`Product Name`, SKU]
This would result in a nested array:
[
[
"Bowler Hat",
"0406654608"
],
[
"Trilby hat",
"0406634348"
],
[
"Bowler Hat",
"040657863"
],
[
"Cloak",
"0406654603"
]
]Aren't the queries are just the same in the aspect of result structure?
Metadata
Metadata
Assignees
Labels
No labels