Skip to content

Expression that should return array node with 1 value returns value node instead #256

@ghadaobaid

Description

@ghadaobaid

Given this JSON:

{
  "usage": {
    "text_units": 1,
    "text_characters": 153,
    "features": 1
  },
  "language": "en",
  "entities": [
    {
      "type": "Incident",
      "text": "Incident",
      "disambiguation": {
        "subtype": [
          "NONE"
        ]
      },
      "count": 1,
      "confidence": 0.999808
    }
  ]
}

and this JSONata Expression:
entities.type[]

Expected result:

[
  "Incident"
]

Actual Result:

"Incident"

The expected result was confirmed using the try.jsonata.org site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions