summaryrefslogtreecommitdiffstats
path: root/test/json-mapped/nested-repeats-2
diff options
context:
space:
mode:
Diffstat (limited to 'test/json-mapped/nested-repeats-2')
-rw-r--r--test/json-mapped/nested-repeats-2/check.txt25
-rw-r--r--test/json-mapped/nested-repeats-2/input.json20
-rw-r--r--test/json-mapped/nested-repeats-2/map.json24
3 files changed, 69 insertions, 0 deletions
diff --git a/test/json-mapped/nested-repeats-2/check.txt b/test/json-mapped/nested-repeats-2/check.txt
new file mode 100644
index 0000000..0553451
--- /dev/null
+++ b/test/json-mapped/nested-repeats-2/check.txt
@@ -0,0 +1,25 @@
+nested repeats 2/1/0:string:"foo"
+nested repeats 2/1/1:string:"A"
+nested repeats 2/1/2:numeric:1000
+nested repeats 2/1/3:string:"A123456789"
+nested repeats 2/1/4:string:"en-US"
+nested repeats 2/2/0:string:"foo"
+nested repeats 2/2/1:string:"A"
+nested repeats 2/2/2:numeric:1001
+nested repeats 2/2/3:string:"A987654321"
+nested repeats 2/2/4:string:"en-US"
+nested repeats 2/3/0:string:"foo"
+nested repeats 2/3/1:string:"B"
+nested repeats 2/3/2:numeric:2000
+nested repeats 2/3/3:string:"B123456789"
+nested repeats 2/3/4:string:"ja-JP"
+nested repeats 2/4/0:string:"foo"
+nested repeats 2/4/1:string:"B"
+nested repeats 2/4/2:numeric:2001
+nested repeats 2/4/3:string:"B987654321"
+nested repeats 2/4/4:string:"ja-JP"
+nested repeats 2/5/0:string:"foo"
+nested repeats 2/5/1:string:"B"
+nested repeats 2/5/2:numeric:2002
+nested repeats 2/5/3:string:"B987654323"
+nested repeats 2/5/4:string:"ja-JP"
diff --git a/test/json-mapped/nested-repeats-2/input.json b/test/json-mapped/nested-repeats-2/input.json
new file mode 100644
index 0000000..ac3da5e
--- /dev/null
+++ b/test/json-mapped/nested-repeats-2/input.json
@@ -0,0 +1,20 @@
+[
+ {"parent": "foo",
+ "data":
+ [
+ {"category": "A", "region": "en-US",
+ "records": [
+ {"id": 1000, "ref": "A123456789"},
+ {"id": 1001, "ref": "A987654321"}
+ ]
+ },
+ {"category": "B", "region": "ja-JP",
+ "records": [
+ {"id": 2000, "ref": "B123456789"},
+ {"id": 2001, "ref": "B987654321"},
+ {"id": 2002, "ref": "B987654323"}
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/json-mapped/nested-repeats-2/map.json b/test/json-mapped/nested-repeats-2/map.json
new file mode 100644
index 0000000..293462d
--- /dev/null
+++ b/test/json-mapped/nested-repeats-2/map.json
@@ -0,0 +1,24 @@
+{
+ "sheets": ["nested repeats 2"],
+
+ "ranges": [
+ {"sheet": "nested repeats 2",
+ "row": 1,
+ "column": 0,
+
+ "fields": [
+ {"path": "$[]['parent']"},
+ {"path": "$[]['data'][]['category']"},
+ {"path": "$[]['data'][]['records'][]['id']"},
+ {"path": "$[]['data'][]['records'][]['ref']"},
+ {"path": "$[]['data'][]['region']"}
+ ],
+
+ "row-groups": [
+ {"path": "$"},
+ {"path": "$[]['data']"},
+ {"path": "$[]['data'][]['records']"}
+ ]
+ }
+ ]
+}