GRAB_LIST

Returns a result of applying jsonpath expression to the input frame. If multiple expressions will be specified - their results will be merged.

Syntax

GRAB_LIST(inputFrame, [grabexpr1], [grabexpr2], ...)
  • inputFrame - The data to run jsonpath on.

  • [grabexpr1], [grabexpr2] - Grabexpr is jsonpaths with optional match renaming "as name"

Sample Usage

GRAB_LIST(C1, "$..nickname")
GRAB_LIST(C1, C2)
{
 "name": "Sasha",
 "age": 16,
 "gender":"female",
    "pets": [
        {
            "nickname": "Alice",
            "kind": "cat",
            "age": 3
        },
        {
            "nickname": "Tina",
            "kind": "dog",
            "age": 2
        },
        {
            "nickname": "Goldy",
            "kind": "fish",
            "age": 1
        }
        ]
}

Return Value

  • Returns frame, that is the result of jsonpath search.

Notes

GRAB_LIST function always wraps result in an array - even if it's a single value; useful in some cases, where the data is inconsistent.

In order for GRAB_LIST to work, the first argument inputFrame must be represented a FROM_JSON formula which returns a json frame.

See Also

Last updated

Was this helpful?