Skip to content

$filter() with list containing null values resulting in Out of Index Exception. #50

@siddhantrawat

Description

@siddhantrawat

while using $filter operation on list from an input, jsonata engine is throwing out of index exception due to null not being part of the element in the ArrayList. (size still being count of the, null + non Null, elements )

{
    "jsonataExpression": "$filter($, function($v, $i, $a){$v})",
    "inputJson": [
        1, null, 2
    ]
}

while if i use the data directly in jsonata, it works fine. like ->

{
    "jsonataExpression": "$filter([1,null,2], function($v, $i, $a){$v})",
    "inputJson": null
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions