Open myitcv opened 9 months ago
Based on https://github.com/cue-lang/cue/discussions/2582
I am trying to find out if merging multiple JSON files which only have one object in it to a list is possible with CUE. This seems like the simplest thing but I am not understanding correctly.
Consider the following file structure:
../ ./ merge.cue input1.json input2.json input3.json
In merge.cue I have a schema
#Foo: { oof: string rab: string } // My non-working output is foos: [...#Foo]
I want the output to be
{ "foos": [ { "oof": "", "rab": "" }, # and so on ]
I have been running with the command cue eval merge.cue *.json --out json
cue eval merge.cue *.json --out json
Is this possible - and if so, can someone point me in the right direction.
Please, and thanks. 👐🏻
@myitcv Do you feel this issue should result in additional content from the differently-titled but identical issue #7?
Based on https://github.com/cue-lang/cue/discussions/2582
I am trying to find out if merging multiple JSON files which only have one object in it to a list is possible with CUE. This seems like the simplest thing but I am not understanding correctly.
Consider the following file structure:
In merge.cue I have a schema
I want the output to be
I have been running with the command
cue eval merge.cue *.json --out json
Is this possible - and if so, can someone point me in the right direction.
Please, and thanks. 👐🏻