-
|
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.jsonIn 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 Is this possible - and if so, can someone point me in the right direction. Please, and thanks. 👐🏻 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @kimfy - welcome to the CUE project. Great question. Here is an example of what I think you're after:
Notice the use of the |
Beta Was this translation helpful? Give feedback.
-
|
Hi @myitcv - thanks for that. I don't think I'd ever find that out by myself. I'm trying to think of ways I could contribute to the documentation, hopefully in a couple of months when I am more familiar with CUE. Wishing you the best! Kim |
Beta Was this translation helpful? Give feedback.
Hi @kimfy - welcome to the CUE project.
Great question. Here is an example of what I think you're after: