summaryrefslogtreecommitdiffstats
path: root/test/json-mapped/array-of-objects-basic
diff options
context:
space:
mode:
Diffstat (limited to 'test/json-mapped/array-of-objects-basic')
-rw-r--r--test/json-mapped/array-of-objects-basic/check.txt20
-rw-r--r--test/json-mapped/array-of-objects-basic/input.json32
-rw-r--r--test/json-mapped/array-of-objects-basic/map.json16
3 files changed, 68 insertions, 0 deletions
diff --git a/test/json-mapped/array-of-objects-basic/check.txt b/test/json-mapped/array-of-objects-basic/check.txt
new file mode 100644
index 0000000..6aba1bb
--- /dev/null
+++ b/test/json-mapped/array-of-objects-basic/check.txt
@@ -0,0 +1,20 @@
+Imported/0/0:numeric:1
+Imported/0/1:string:"Caitlin"
+Imported/0/2:string:"Kealy"
+Imported/0/3:string:"ckealy0@hud.gov"
+Imported/1/0:numeric:2
+Imported/1/1:string:"Bernice"
+Imported/1/2:string:"McEvilly"
+Imported/1/3:string:"bmcevilly1@comsenz.com"
+Imported/2/0:numeric:3
+Imported/2/1:string:"Ariel"
+Imported/2/2:string:"Casajuana"
+Imported/2/3:string:"acasajuana2@fema.gov"
+Imported/3/0:numeric:4
+Imported/3/1:string:"Grannie"
+Imported/3/2:string:"Parlot"
+Imported/3/3:string:"gparlot3@soup.io"
+Imported/4/0:numeric:5
+Imported/4/1:string:"Merridie"
+Imported/4/2:string:"Dungey"
+Imported/4/3:string:"mdungey4@nifty.com"
diff --git a/test/json-mapped/array-of-objects-basic/input.json b/test/json-mapped/array-of-objects-basic/input.json
new file mode 100644
index 0000000..1d10e9e
--- /dev/null
+++ b/test/json-mapped/array-of-objects-basic/input.json
@@ -0,0 +1,32 @@
+[
+ {
+ "id": 1,
+ "first_name": "Caitlin",
+ "last_name": "Kealy",
+ "email": "ckealy0@hud.gov"
+ },
+ {
+ "id": 2,
+ "first_name": "Bernice",
+ "last_name": "McEvilly",
+ "email": "bmcevilly1@comsenz.com"
+ },
+ {
+ "id": 3,
+ "first_name": "Ariel",
+ "last_name": "Casajuana",
+ "email": "acasajuana2@fema.gov"
+ },
+ {
+ "id": 4,
+ "first_name": "Grannie",
+ "last_name": "Parlot",
+ "email": "gparlot3@soup.io"
+ },
+ {
+ "id": 5,
+ "first_name": "Merridie",
+ "last_name": "Dungey",
+ "email": "mdungey4@nifty.com"
+ }
+] \ No newline at end of file
diff --git a/test/json-mapped/array-of-objects-basic/map.json b/test/json-mapped/array-of-objects-basic/map.json
new file mode 100644
index 0000000..a9b949c
--- /dev/null
+++ b/test/json-mapped/array-of-objects-basic/map.json
@@ -0,0 +1,16 @@
+{
+ "sheets": ["Imported"],
+ "ranges": [
+ {"sheet": "Imported", "row": 0, "column": 0,
+ "fields": [
+ {"path": "$[]['id']"},
+ {"path": "$[]['first_name']"},
+ {"path": "$[]['last_name']"},
+ {"path": "$[]['email']"}
+ ],
+ "row-groups": [
+ {"path": "$"}
+ ]
+ }
+ ]
+}