summaryrefslogtreecommitdiffstats
path: root/test/json-structure/repeat-objects
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/json-structure/repeat-objects-2/check.txt6
-rw-r--r--test/json-structure/repeat-objects-2/input.json6
-rw-r--r--test/json-structure/repeat-objects/check.txt2
-rw-r--r--test/json-structure/repeat-objects/input.json6
4 files changed, 20 insertions, 0 deletions
diff --git a/test/json-structure/repeat-objects-2/check.txt b/test/json-structure/repeat-objects-2/check.txt
new file mode 100644
index 0000000..9e406e0
--- /dev/null
+++ b/test/json-structure/repeat-objects-2/check.txt
@@ -0,0 +1,6 @@
+$array[3].object(*)['age'].value
+$array[3].object(*)['name'].value
+$array[3].object(*)['props'].object['alpha'].value
+$array[3].object(*)['props'].object['beta'].value
+$array[3].object(*)['props'].object['gamma'].value
+$array[3].object(*)['props'].object['theta'].value
diff --git a/test/json-structure/repeat-objects-2/input.json b/test/json-structure/repeat-objects-2/input.json
new file mode 100644
index 0000000..54ba1cc
--- /dev/null
+++ b/test/json-structure/repeat-objects-2/input.json
@@ -0,0 +1,6 @@
+[
+ {"name": "a", "age": 12, "props": {"alpha": 1, "beta": 2}},
+ {"name": "b", "age": 13, "props": {"gamma": 3}},
+ {"name": "c", "age": 14, "props": {"theta": 4}},
+]
+
diff --git a/test/json-structure/repeat-objects/check.txt b/test/json-structure/repeat-objects/check.txt
new file mode 100644
index 0000000..df6de0b
--- /dev/null
+++ b/test/json-structure/repeat-objects/check.txt
@@ -0,0 +1,2 @@
+$array[4].object(*)['age'].value
+$array[4].object(*)['name'].value
diff --git a/test/json-structure/repeat-objects/input.json b/test/json-structure/repeat-objects/input.json
new file mode 100644
index 0000000..27882a4
--- /dev/null
+++ b/test/json-structure/repeat-objects/input.json
@@ -0,0 +1,6 @@
+[
+ {"name": "a", "age": 12},
+ {"name": "b", "age": true},
+ {"name": "c", "age": null},
+ {"name": "d", "age": "n/a"},
+]