Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My job looks like:
tFileInputJSON > tFileOutputDelimited
I can get all the data for all the fields from the first JSON object fine, but I can't seem to make it loop through all the objects in the JSON file to get more than a single row of output.
I am trying to get all the data out for the device. In the fFileInputJSON, the Loop Json query is "$.device"
Here is a sample from the file:
Please find the screen shot below for jsonextract component.
Regards,
Yes, I was only able to paste in 2 JSON strings because of the 20K character limit on the the Talend forum.
I think this is a good reduced version which can be used for troubleshooting:
{"guid":"stuff1","schemaRevision":1,"app":{"version":"123"},"user":[],"device":{"androidApi":1,"fingerprint":"abc","brand":"MOTO","device":"phone1"}}
{"guid":"stuff2","schemaRevision":2,"app":{"version":"456"},"user":[],"device":{"androidApi":2,"fingerprint":"def","brand":"HTC","device":"phone2"}}
{"guid":"stuff3","schemaRevision":3,"app":{"version":"789"},"user":[],"device":{"androidApi":3,"fingerprint":"ghi","brand":"LG","device":"phone3"}}
{"guid":"stuff4","schemaRevision":4,"app":{"version":"1011"},"user":[],"device":{"androidApi":4,"fingerprint":"jkl","brand":"SAM","device":"phone4"}}
Can you please provide expected output?
Regards,
1,abc,MOTO,phone1
2,def,HTC,phone2
3,ghi,LG,phone3
4,jkl,SAM,phone4
Hi,
Please find the job below to read json file and derive device details.
Regards,
Please find the screen shot below for jsonextract component.
Regards,
Thanks! I hadn't messed with JSON much before yesterday.