Dot notation with key named length on array

Setup

Selector: $.length

[4, 5, 6]

Results

Consensus

[]

Scalar consensus

The scalar consensus applies for implementations which return a single value where only one match is possible (instead of an array of a single value).

null

Not found consensus

This consensus applies for implementations which return a specific not found value if no match exists.

NOT_FOUND

Scalar not found consensus

This consensus applies for implementations which returns a specific not found value when a query that would regularly return a single match results in no match.

NOT_FOUND

Other responses

Cpp (jsoncons)

[
  3
]

Golang (github.com-oliveagle-jsonpath) ¹

[]

Golang (github.com-spyzhov-ajson)

[
  3
]

JavaScript (Goessner) ²

[
  3
]

JavaScript (brunerd)

[
  3
]

JavaScript (jsonpath)

[
  3
]

JavaScript (jsonpath-plus)

[
  3
]

PHP (galbar-jsonpath) ²

[
  3
]

PHP (softcreatr-jsonpath)

[
  3
]

dotNET (Manatee.Json)

[
  3
]

Errors

Golang (github.com-PaesslerAG-jsonpath) ¹

could not select value, invalid key: expected number but got length (string)

Footnotes