If you give jk transform a file input with multiple documents, it'll transform each individually; but, when it goes to write them out, it has separate entries for each value using the same filename, and the generate code will complain that you're trying to overwrite a file.
There's two problems in the code: firstly, transform correctly transforms each value, but gives each its own entry, rather than giving them back as an array; second, it needs to give them the stream format, so they will be written as multiple values, rather than as an array, in the file.
If you give
jk transform
a file input with multiple documents, it'll transform each individually; but, when it goes to write them out, it has separate entries for each value using the same filename, and the generate code will complain that you're trying to overwrite a file.For example,
There's two problems in the code: firstly, transform correctly transforms each value, but gives each its own entry, rather than giving them back as an array; second, it needs to give them the stream format, so they will be written as multiple values, rather than as an array, in the file.