Skip to content

Queries

Sascha Greuel edited this page Oct 30, 2020 · 12 revisions

Below, you will find a list of queries, which are currently supported by this library. This list has been created, based on the great comparison list project by Christoph Burgmer.

Other queries might be supported too, but there's no consensus (aka expected result), therefore it is unclear if the results returned are correct, or not.

Corresponding unit/functional tests for these specific queries can be found here.


Array Slice
Table of Contents

Array Slice

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[1:3]

Consensus:

[
    "second",
    "third"
]

Array Slice On Exact Match

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[0:5]

Consensus:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Array Slice On Non Overlapping Array

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[7:10]

Consensus:

[]

Array Slice On Object

Test Data:

{
    ":": 42,
    "more": "string",
    "a": 1,
    "b": 2,
    "c": 3,
    "1:3": "nice"
}

Selector:

$[1:3]

Consensus:

[]

Array Slice On Partially Overlapping Array

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[1:10]

Consensus:

[
    "second",
    "third"
]

Array Slice With Negative Start And End And Range Of -1

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[-4:-5]

Consensus:

[]

Array Slice With Negative Start And End And Range Of 0

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[-4:-4]

Consensus:

[]

Array Slice With Negative Start And End And Range Of 1

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[-4:-3]

Consensus:

[
    4
]

Array Slice With Negative Start And Positive End And Range Of -1

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[-4:1]

Consensus:

[]

Array Slice With Negative Start And Positive End And Range Of 0

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[-4:2]

Consensus:

[]

Array Slice With Negative Start And Positive End And Range Of 1

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[-4:3]

Consensus:

[
    4
]

Array Slice With Open End

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[1:]

Consensus:

[
    "second",
    "third",
    "forth",
    "fifth"
]

Array Slice With Open Start

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[:2]

Consensus:

[
    "first",
    "second"
]

Array Slice With Open Start And End

Test Data:

[
    "first",
    "second"
]

Selector:

$[:]

Consensus:

[
    "first",
    "second"
]

Array Slice With Open Start And End And Step Empty

Test Data:

[
    "first",
    "second"
]

Selector:

$[::]

Consensus:

[
    "first",
    "second"
]

Array Slice With Positive Start And Negative End And Range Of -1

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[3:-4]

Consensus:

[]

Array Slice With Positive Start And Negative End And Range Of 0

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[3:-3]

Consensus:

[]

Array Slice With Positive Start And Negative End And Range Of 1

Test Data:

[
    2,
    "a",
    4,
    5,
    100,
    "nice"
]

Selector:

$[3:-2]

Consensus:

[
    5
]

Array Slice With Range Of -1

Test Data:

[
    "first",
    "second",
    "third",
    "forth"
]

Selector:

$[2:1]

Consensus:

[]

Array Slice With Range Of 0

Test Data:

[
    "first",
    "second"
]

Selector:

$[0:0]

Consensus:

[]

Array Slice With Range Of 1

Test Data:

[
    "first",
    "second"
]

Selector:

$[0:1]

Consensus:

[
    "first"
]

Array Slice With Start -1 And Open End

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[-1:]

Consensus:

[
    "third"
]

Array Slice With Start -2 And Open End

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[-2:]

Consensus:

[
    "second",
    "third"
]

Array Slice With Start Large Negative Number And Open End On Short Array

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[-4:]

Consensus:

[
    "first",
    "second",
    "third"
]

Array Slice With Step

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[0:3:2]

Consensus:

[
    "first",
    "third"
]

Array Slice With Step 1

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[0:3:1]

Consensus:

[
    "first",
    "second",
    "third"
]

Array Slice With Step And Leading Zeros

Test Data:

[
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    21,
    22,
    23,
    24,
    25
]

Selector:

$[010:024:010]

Consensus:

[
    10,
    20
]

Array Slice With Step But End Not Aligned

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[0:4:2]

Consensus:

[
    "first",
    "third"
]

Array Slice With Step Empty

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[1:3:]

Consensus:

[
    "second",
    "third"
]

Array Slice With Step Only

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[::2]

Consensus:

[
    "first",
    "third",
    "fifth"
]
Bracket Notation
Table of Contents

Bracket Notation

Test Data:

{
    "key": "value"
}

Selector:

$['key']

Consensus:

[
    "value"
]

Bracket Notation After Recursive Descent

Test Data:

[
    "first",
    {
        "key": [
            "first nested",
            {
                "more": [
                    {
                        "nested": [
                            "deepest",
                            "second"
                        ]
                    },
                    [
                        "more",
                        "values"
                    ]
                ]
            }
        ]
    }
]

Selector:

$..[0]

Consensus:

[
    "deepest",
    "first nested",
    "first",
    "more",
    {
        "nested": [
            "deepest",
            "second"
        ]
    }
]

Bracket Notation On Object Without Key

Test Data:

{
    "key": "value"
}

Selector:

$['missing']

Consensus:

[]

Bracket Notation With NFC Path On NFD Key

Test Data:

{
    "u\u0308": 42
}

Selector:

$['ü']

Consensus:

[]

Bracket Notation With Dot

Test Data:

{
    "one": {
        "key": "value"
    },
    "two": {
        "some": "more",
        "key": "other value"
    },
    "two.some": "42"
}

Selector:

$['two.some']

Consensus:

[
    "42"
]

Bracket Notation With Double Quotes

Test Data:

{
    "key": "value"
}

Selector:

$["key"]

Consensus:

[
    "value"
]

Bracket Notation With Empty String

Test Data:

{
    "": 42,
    "''": 123,
    "\"\"": 222
}

Selector:

$['']

Consensus:

[
    42
]

Bracket Notation With Empty String Doubled Quoted

Test Data:

{
    "": 42,
    "''": 123,
    "\"\"": 222
}

Selector:

$[""]

Consensus:

[
    42
]

Bracket Notation With Negative Number On Short Array

Test Data:

[
    "one element"
]

Selector:

$[-2]

Consensus:

[]

Bracket Notation With Number

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[2]

Consensus:

[
    "third"
]

Bracket Notation With Number -1

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[-1]

Consensus:

[
    "third"
]

Bracket Notation With Number -1 On Empty Array

Test Data:

[]

Selector:

$[-1]

Consensus:

[]

Bracket Notation With Number 0

Test Data:

[
    "first",
    "second",
    "third",
    "forth",
    "fifth"
]

Selector:

$[0]

Consensus:

[
    "first"
]

Bracket Notation With Number After Dot Notation With Wildcard On Nested Arrays With Different Length

Test Data:

[
    [
        1
    ],
    [
        2,
        3
    ]
]

Selector:

$.*[1]

Consensus:

[
    3
]

Bracket Notation With Number On Short Array

Test Data:

[
    "one element"
]

Selector:

$[1]

Consensus:

[]

Bracket Notation With Quoted Array Slice Literal

Test Data:

{
    ":": "value",
    "another": "entry"
}

Selector:

$[':']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Closing Bracket Literal

Test Data:

{
    "]": 42
}

Selector:

$[']']

Consensus:

[
    42
]

Bracket Notation With Quoted Current Object Literal

Test Data:

{
    "@": "value",
    "another": "entry"
}

Selector:

$['@']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Dot Literal

Test Data:

{
    ".": "value",
    "another": "entry"
}

Selector:

$['.']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Dot Wildcard

Test Data:

{
    "key": 42,
    ".*": 1,
    "": 10
}

Selector:

$['.*']

Consensus:

[
    1
]

Bracket Notation With Quoted Double Quote Literal

Test Data:

{
    "\"": "value",
    "another": "entry"
}

Selector:

$['"']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Number On Object

Test Data:

{
    "0": "value"
}

Selector:

$['0']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Root Literal

Test Data:

{
    "$": "value",
    "another": "entry"
}

Selector:

$['$']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Union Literal

Test Data:

{
    ",": "value",
    "another": "entry"
}

Selector:

$[',']

Consensus:

[
    "value"
]

Bracket Notation With Quoted Wildcard Literal

Test Data:

{
    "*": "value",
    "another": "entry"
}

Selector:

$['*']

Consensus:

[
    "value"
]

Bracket Notation With String Including Dot Wildcard

Test Data:

{
    "nice": 42,
    "ni.*": 1,
    "mice": 100
}

Selector:

$['ni.*']

Consensus:

[
    1
]

Bracket Notation With Wildcard After Array Slice

Test Data:

[
    [
        1,
        2
    ],
    [
        "a",
        "b"
    ],
    [
        0,
        0
    ]
]

Selector:

$[0:2][*]

Consensus:

[
    1,
    2,
    "a",
    "b"
]

Bracket Notation With Wildcard After Dot Notation After Bracket Notation With Wildcard

Test Data:

[
    {
        "bar": [
            42
        ]
    }
]

Selector:

$[*].bar[*]

Consensus:

[
    42
]

Bracket Notation With Wildcard After Recursive Descent

Test Data:

{
    "key": "value",
    "another key": {
        "complex": "string",
        "primitives": [
            0,
            1
        ]
    }
}

Selector:

$..[*]

Consensus:

[
    "string",
    "value",
    0,
    1,
    [
        0,
        1
    ],
    {
        "complex": "string",
        "primitives": [
            0,
            1
        ]
    }
]

Bracket Notation With Wildcard On Array

Test Data:

[
    "string",
    42,
    {
        "key": "value"
    },
    [
        0,
        1
    ]
]

Selector:

$[*]

Consensus:

[
    "string",
    42,
    {
        "key": "value"
    },
    [
        0,
        1
    ]
]

Bracket Notation With Wildcard On Empty Array

Test Data:

[]

Selector:

$[*]

Consensus:

[]

Bracket Notation With Wildcard On Empty Object

Test Data:

{}

Selector:

$[*]

Consensus:

[]

Bracket Notation With Wildcard On Null Value Array

Test Data:

[
    40,
    null,
    42
]

Selector:

$[*]

Consensus:

[
    40,
    null,
    42
]

Bracket Notation With Wildcard On Object

Test Data:

{
    "some": "string",
    "int": 42,
    "object": {
        "key": "value"
    },
    "array": [
        0,
        1
    ]
}

Selector:

$[*]

Consensus:

[
    "string",
    42,
    [
        0,
        1
    ],
    {
        "key": "value"
    }
]
Dot Notation
Table of Contents

Dot Notation

Test Data:

{
    "key": "value"
}

Selector:

$.key

Consensus:

[
    "value"
]

Dot Notation After Array Slice

Test Data:

[
    {
        "key": "ey"
    },
    {
        "key": "bee"
    },
    {
        "key": "see"
    }
]

Selector:

$[0:2].key

Consensus:

[
    "ey",
    "bee"
]

Dot Notation After Bracket Notation After Recursive Descent

Test Data:

{
    "k": [
        {
            "key": "some value"
        },
        {
            "key": 42
        }
    ],
    "kk": [
        [
            {
                "key": 100
            },
            {
                "key": 200
            },
            {
                "key": 300
            }
        ],
        [
            {
                "key": 400
            },
            {
                "key": 500
            },
            {
                "key": 600
            }
        ]
    ],
    "key": [
        0,
        1
    ]
}

Selector:

$..[1].key

Consensus:

[
    200,
    42,
    500
]

Dot Notation After Bracket Notation With Wildcard

Test Data:

[
    {
        "a": 1
    },
    {
        "a": 1
    }
]

Selector:

$[*].a

Consensus:

[
    1,
    1
]

Dot Notation After Bracket Notation With Wildcard On One Matching

Test Data:

[
    {
        "a": 1
    }
]

Selector:

$[*].a

Consensus:

[
    1
]

Dot Notation After Bracket Notation With Wildcard On Some Matching

Test Data:

[
    {
        "a": 1
    },
    {
        "b": 1
    }
]

Selector:

$[*].a

Consensus:

[
    1
]

Dot Notation After Filter Expression

Test Data:

[
    {
        "id": 42,
        "name": "forty-two"
    },
    {
        "id": 1,
        "name": "one"
    }
]

Selector:

$[?(@.id==42)].name

Consensus:

[
    "forty-two"
]

Dot Notation After Recursive Descent

Test Data:

{
    "object": {
        "key": "value",
        "array": [
            {
                "key": "something"
            },
            {
                "key": {
                    "key": "russian dolls"
                }
            }
        ]
    },
    "key": "top"
}

Selector:

$..key

Consensus:

[
    "russian dolls",
    "something",
    "top",
    "value",
    {
        "key": "russian dolls"
    }
]

Dot Notation After Recursive Descent After Dot Notation

Test Data:

{
    "store": {
        "book": [
            {
                "category": "reference",
                "author": "Nigel Rees",
                "title": "Sayings of the Century",
                "price": 8.95
            },
            {
                "category": "fiction",
                "author": "Evelyn Waugh",
                "title": "Sword of Honour",
                "price": 12.99
            },
            {
                "category": "fiction",
                "author": "Herman Melville",
                "title": "Moby Dick",
                "isbn": "0-553-21311-3",
                "price": 8.99
            },
            {
                "category": "fiction",
                "author": "J. R. R. Tolkien",
                "title": "The Lord of the Rings",
                "isbn": "0-395-19395-8",
                "price": 22.99
            }
        ],
        "bicycle": {
            "color": "red",
            "price": 19.95
        }
    }
}

Selector:

$.store..price

Consensus:

[
    12.99,
    19.95,
    22.99,
    8.95,
    8.99
]

Dot Notation After Union

Test Data:

[
    {
        "key": "ey"
    },
    {
        "key": "bee"
    },
    {
        "key": "see"
    }
]

Selector:

$[0,2].key

Consensus:

[
    "ey",
    "see"
]

Dot Notation After Union With Keys

Test Data:

{
    "one": {
        "key": "value"
    },
    "two": {
        "k": "v"
    },
    "three": {
        "some": "more",
        "key": "other value"
    }
}

Selector:

$['one','three'].key

Consensus:

[
    "value",
    "other value"
]

Dot Notation On Array

Test Data:

[
    0,
    1
]

Selector:

$.key

Consensus:

[]

Dot Notation On Array Value

Test Data:

{
    "key": [
        "first",
        "second"
    ]
}

Selector:

$.key

Consensus:

[
    [
        "first",
        "second"
    ]
]

Dot Notation On Array With Containing Object Matching Key

Test Data:

[
    {
        "id": 2
    }
]

Selector:

$.id

Consensus:

[]

Dot Notation On Empty Object Value

Test Data:

{
    "key": {}
}

Selector:

$.key

Consensus:

[
    {}
]

Dot Notation On Null Value

Test Data:

{
    "key": null
}

Selector:

$.key

Consensus:

[
    null
]

Dot Notation On Object Without Key

Test Data:

{
    "key": "value"
}

Selector:

$.missing

Consensus:

[]

Dot Notation With Dash

Test Data:

{
    "key-dash": "value"
}

Selector:

$.key-dash

Consensus:

[
    "value"
]

Dot Notation With Key Named In

Test Data:

{
    "in": "value"
}

Selector:

$.in

Consensus:

[
    "value"
]

Dot Notation With Key Named Length

Test Data:

{
    "length": "value"
}

Selector:

$.length

Consensus:

[
    "value"
]

Dot Notation With Key Named Length On Array

Test Data:

[
    4,
    5,
    6
]

Selector:

$.length

Consensus:

[]

Dot Notation With Key Named Null

Test Data:

{
    "null": "value"
}

Selector:

$.null

Consensus:

[
    "value"
]

Dot Notation With Key Named True

Test Data:

{
    "true": "value"
}

Selector:

$.true

Consensus:

[
    "value"
]

Dot Notation With Non ASCII Key

Test Data:

{
    "\u5c6c\u6027": "value"
}

Selector:

$.屬性

Consensus:

[
    "value"
]

Dot Notation With Number On Object

Test Data:

{
    "a": "first",
    "2": "second",
    "b": "third"
}

Selector:

$.2

Consensus:

[
    "second"
]

Dot Notation With Wildcard After Dot Notation After Dot Notation With Wildcard

Test Data:

[
    {
        "bar": [
            42
        ]
    }
]

Selector:

$.*.bar.*

Consensus:

[
    42
]

Dot Notation With Wildcard After Dot Notation With Wildcard On Nested Arrays

Test Data:

[
    [
        1,
        2,
        3
    ],
    [
        4,
        5,
        6
    ]
]

Selector:

$.*.*

Consensus:

[
    1,
    2,
    3,
    4,
    5,
    6
]

Dot Notation With Wildcard After Recursive Descent

Test Data:

{
    "key": "value",
    "another key": {
        "complex": "string",
        "primitives": [
            0,
            1
        ]
    }
}

Selector:

$..*

Consensus:

[
    "string",
    "value",
    0,
    1,
    [
        0,
        1
    ],
    {
        "complex": "string",
        "primitives": [
            0,
            1
        ]
    }
]

Dot Notation With Wildcard After Recursive Descent On Null Value Array

Test Data:

[
    40,
    null,
    42
]

Selector:

$..*

Consensus:

[
    40,
    42,
    null
]

Dot Notation With Wildcard After Recursive Descent On Scalar

Test Data:

42

Selector:

$..*

Consensus:

[]

Dot Notation With Wildcard On Array

Test Data:

[
    "string",
    42,
    {
        "key": "value"
    },
    [
        0,
        1
    ]
]

Selector:

$.*

Consensus:

[
    "string",
    42,
    {
        "key": "value"
    },
    [
        0,
        1
    ]
]

Dot Notation With Wildcard On Empty Array

Test Data:

[]

Selector:

$.*

Consensus:

[]

Dot Notation With Wildcard On Empty Object

Test Data:

{}

Selector:

$.*

Consensus:

[]

Dot Notation With Wildcard On Object

Test Data:

{
    "some": "string",
    "int": 42,
    "object": {
        "key": "value"
    },
    "array": [
        0,
        1
    ]
}

Selector:

$.*

Consensus:

[
    "string",
    42,
    [
        0,
        1
    ],
    {
        "key": "value"
    }
]
Filter Expression
Table of Contents

Filter Expression With Bracket Notation

Test Data:

[
    {
        "key": 0
    },
    {
        "key": 42
    },
    {
        "key": -1
    },
    {
        "key": 41
    },
    {
        "key": 43
    },
    {
        "key": 42.0001
    },
    {
        "key": 41.9999
    },
    {
        "key": 100
    },
    {
        "some": "value"
    }
]

Selector:

$[?(@['key']==42)]

Consensus:

[
    {
        "key": 42
    }
]

Filter Expression With Bracket Notation And Current Object Literal

Test Data:

[
    {
        "@key": 0
    },
    {
        "@key": 42
    },
    {
        "key": 42
    },
    {
        "@key": 43
    },
    {
        "some": "value"
    }
]

Selector:

$[?(@['@key']==42)]

Consensus:

[
    {
        "@key": 42
    }
]

Filter Expression With Bracket Notation With Number

Test Data:

[
    [
        "a",
        "b"
    ],
    [
        "x",
        "y"
    ]
]

Selector:

$[?(@[1]=='b')]

Consensus:

[
    [
        "a",
        "b"
    ]
]

Filter Expression With Equals On Array Without Match

Test Data:

[
    {
        "key": 42
    }
]

Selector:

$[?(@.key==43)]

Consensus:

[]

Filter Expression With Equals String With Current Object Literal

Test Data:

[
    {
        "key": "some"
    },
    {
        "key": "value"
    },
    {
        "key": "[email protected]"
    }
]

Selector:

$[?(@.key=="[email protected]")]

Consensus:

[
    {
        "key": "[email protected]"
    }
]

Filter Expression With Equals String With Dot Literal

Test Data:

[
    {
        "key": "some"
    },
    {
        "key": "value"
    },
    {
        "key": "some.value"
    }
]

Selector:

$[?(@.key=="some.value")]

Consensus:

[
    {
        "key": "some.value"
    }
]

Filter Expression With Equals String With Single Quotes

Test Data:

[
    {
        "key": "some"
    },
    {
        "key": "value"
    }
]

Selector:

$[?(@.key=='value')]

Consensus:

[
    {
        "key": "value"
    }
]

Filter Expression With Subpaths

Test Data:

[
    {
        "address": {
            "city": "Berlin"
        }
    },
    {
        "address": {
            "city": "London"
        }
    }
]

Selector:

$[?(@.address.city=='Berlin')]

Consensus:

[
    {
        "address": {
            "city": "Berlin"
        }
    }
]
Root
Table of Contents

Root

Test Data:

{
    "key": "value",
    "another key": {
        "complex": [
            "a",
            1
        ]
    }
}

Selector:

$

Consensus:

[
    {
        "another key": {
            "complex": [
                "a",
                1
            ]
        },
        "key": "value"
    }
]

Root On Scalar

Test Data:

42

Selector:

$

Consensus:

[
    42
]

Root On Scalar False

Test Data:

false

Selector:

$

Consensus:

[
    false
]

Root On Scalar True

Test Data:

true

Selector:

$

Consensus:

[
    true
]
Union
Table of Contents

Union

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[0,1]

Consensus:

[
    "first",
    "second"
]

Union With Keys

Test Data:

{
    "key": "value",
    "another": "entry"
}

Selector:

$['key','another']

Consensus:

[
    "value",
    "entry"
]

Union With Keys After Array Slice

Test Data:

[
    {
        "c": "cc1",
        "d": "dd1",
        "e": "ee1"
    },
    {
        "c": "cc2",
        "d": "dd2",
        "e": "ee2"
    }
]

Selector:

$[:]['c','d']

Consensus:

[
    "cc1",
    "dd1",
    "cc2",
    "dd2"
]

Union With Keys After Bracket Notation

Test Data:

[
    {
        "c": "cc1",
        "d": "dd1",
        "e": "ee1"
    },
    {
        "c": "cc2",
        "d": "dd2",
        "e": "ee2"
    }
]

Selector:

$[0]['c','d']

Consensus:

[
    "cc1",
    "dd1"
]

Union With Keys On Object Without Key

Test Data:

{
    "key": "value",
    "another": "entry"
}

Selector:

$['missing','key']

Consensus:

[
    "value"
]

Union With Numbers In Decreasing Order

Test Data:

[
    1,
    2,
    3,
    4,
    5
]

Selector:

$[4,1]

Consensus:

[
    5,
    2
]

Union With Spaces

Test Data:

[
    "first",
    "second",
    "third"
]

Selector:

$[ 0 , 1 ]

Consensus:

[
    "first",
    "second"
]
Clone this wiki locally