Skip to content

Referencing data values within a map #124

@smf723

Description

@smf723

This is probably a newbie question and I searched but couldn't find a relevant resolved issue. I have the need to write an expression that references data values outside of the array within a map expression:

Logic:
{
"map": [{ "var": "ROOT.TESTS" },
{ ">=": [{ "var": "RATE" }, { "var": "ROOT.TARGET" }] }
]
}

Data:
{ "ROOT":
{
"TARGET": 23,
"TESTS": [
{ "ID": 1, "RATE": 22 },
{ "ID": 2, "RATE": 23 }
]
}
}

Here I want to find the tests where the test rate value exceeds the target value. Is there any way to reference data values within a map expression that are outside of the data being mapped? Or is there some other approach I could use to accomplish this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions