Skip to content

Commit 7a56d32

Browse files
committed
Add integration test for flatten #122
1 parent e044f86 commit 7a56d32

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"zoo" : [ {
3+
"animals" : [ "ant", "dog", "cat", "fish", "zebra", "horse", "hippo", "giraffe" ]
4+
} ]
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"zoo": [ {"animals" : [ [ "ant", "dog" ], "cat", [ "fish", [ "zebra", "horse" ], "hippo" ], "giraffe"] } ]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flatten("zoo.*.animals[]")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FLUX_DIR + "input.json"
2+
|open-file
3+
|as-records
4+
|decode-json
5+
|fix(FLUX_DIR + "test.fix")
6+
|encode-json(prettyPrinting="true")
7+
|write(FLUX_DIR + "output-metafix.json")
8+
;

0 commit comments

Comments
 (0)