Skip to content

Incorrect result when accessing array index #738

@Stadly

Description

@Stadly

Data:

{
  "idx": 0,
  "nestedArray": [
    [
      false,
      false
    ]
  ]
}

Expression: nestedArray[$$.idx][0]

JSONata Exerciser: https://try.jsonata.org/loN4IGN1u

I would have expected the result to be false. It is [false, false].

Using version 1.4.1 yields the expected result.

Changing $$.idx to 0 in the expression yields the expected result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions