diff --git a/cts.json b/cts.json index 11af641..52b6d53 100644 --- a/cts.json +++ b/cts.json @@ -93,9 +93,15 @@ "a": "A", "b": "B" }, - "result": [ - "A", - "B" + "results": [ + [ + "A", + "B" + ], + [ + "B", + "A" + ] ] }, { @@ -135,9 +141,15 @@ "b": "By" } }, - "result": [ - "Ax", - "Ay" + "results": [ + [ + "Ax", + "Ay" + ], + [ + "Ay", + "Ax" + ] ] }, { @@ -464,6 +476,34 @@ "f" ] }, + { + "name": "basic, descendant segment, object traversal, multiple selectors", + "selector": "$..['a','d']", + "document": { + "x": { + "a": "b", + "d": "e" + }, + "y": { + "a": "c", + "d": "f" + } + }, + "results": [ + [ + "b", + "e", + "c", + "f" + ], + [ + "c", + "f", + "b", + "e" + ] + ] + }, { "name": "basic, bald descendant segment", "selector": "$..", diff --git a/tests/basic.json b/tests/basic.json index a21e966..dbfe7b2 100644 --- a/tests/basic.json +++ b/tests/basic.json @@ -92,10 +92,13 @@ "a": "A", "b": "B" }, - "result": [ + "results": [[ "A", "B" - ] + ],[ + "B", + "A" + ]] }, { "name": "wildcard shorthand, array data", @@ -134,10 +137,13 @@ "b": "By" } }, - "result": [ + "results": [[ "Ax", "Ay" - ] + ],[ + "Ay", + "Ax" + ]] }, { "name": "multiple selectors", @@ -424,6 +430,22 @@ "f" ] }, + { + "name": "descendant segment, object traversal, multiple selectors", + "selector" : "$..['a','d']", + "document" : {"x": {"a": "b", "d": "e"}, "y": {"a":"c", "d": "f"}}, + "results": [[ + "b", + "e", + "c", + "f" + ],[ + "c", + "f", + "b", + "e" + ]] + }, { "name": "bald descendant segment", "selector": "$..",