Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! As the title says, I want to use tFileInputJSON to output 1 record per object, when the json file is structured as in the attached example file.
To be clear, want to have one record PER object in the array, so in the case of the attached file, it would be three rows, and each row would only have a 1 column, which would be the entire JSON object as a string.
I cannot hardcode the column names, because they are not the same for every execution - I will extract the columns names using custom java code later on.
I have attached a screenshot of the component setup right now. I've tried lots of small variations on what you see in the screenshot, including toggling the "use loop node as root".
Thank you!
Hi
Set the Json query as below:
"@"
Is this the output string you expect?
Starting job J11 at 16:07 21/11/2023.
[statistics] connecting to socket on port 3480
[statistics] connected
{"FirstName":"Bob","LastName":"Doe"}
{"FirstName":"Frank","LastName":"Doe"}
{"FirstName":"John","LastName":"Doe"}
[statistics] disconnected
Job J11 ended at 16:07 21/11/2023. [Exit code = 0]
Regards
Shong
Hi
Set the Json query as below:
"@"
Is this the output string you expect?
Starting job J11 at 16:07 21/11/2023.
[statistics] connecting to socket on port 3480
[statistics] connected
{"FirstName":"Bob","LastName":"Doe"}
{"FirstName":"Frank","LastName":"Doe"}
{"FirstName":"John","LastName":"Doe"}
[statistics] disconnected
Job J11 ended at 16:07 21/11/2023. [Exit code = 0]
Regards
Shong
yes, perfect! I did not know about the "@" character in the json path syntax. Thank you!
Great, thanks for your feedback!