Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Add integration test for flatten #122
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jul 15, 2022
1 parent e044f86 commit 7a56d32
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"zoo" : [ {
"animals" : [ "ant", "dog", "cat", "fish", "zebra", "horse", "hippo", "giraffe" ]
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"zoo": [ {"animals" : [ [ "ant", "dog" ], "cat", [ "fish", [ "zebra", "horse" ], "hippo" ], "giraffe"] } ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flatten("zoo.*.animals[]")
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FLUX_DIR + "input.json"
|open-file
|as-records
|decode-json
|fix(FLUX_DIR + "test.fix")
|encode-json(prettyPrinting="true")
|write(FLUX_DIR + "output-metafix.json")
;

0 comments on commit 7a56d32

Please sign in to comment.