Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to add missing child array elements in json with tjson components in talend

Hi,

We are getting JSON file from MONGODB/DOCDB where in they dont store/send key when the value is null.we are not getting the standard structure as expected by tfileinputjson->textractjson which is leading to the filtering of records.

is there any way to find out the missing arrays and replace them with null entries.

I have gone through the post 

https://community.talend.com/t5/Archive/tFileInputJson-Arrays-with-missing-Child-Elements-Cause-Issu...

but my issue is different than the above.

 

for example:

 

{"data":
[{
"id":"1",
"name":"Arc",
"category":"normal",
"type":[{"id":"1",
"desc":"emp"
}]
},
{
"id":"2",
"name":"siv",
"category":"abnormal",
"type":[{"id":"2",
"desc":"lead"
}]
},
{
"id":"3",
"name":"kar",
"category":"soabnormal",
"type":[]
},
{
"id":"4",
"name":"pras",
"category":"soveryabnormal"
},
{
"id":"5"
}
]
}

 

for ids 3,4,5 i need to have 

"type":[{"id":"null",
"desc":"null"
}]

 

Any immediate response will be very much helpful.

 

Thanks in advance,

Archana

Labels (2)
0 Replies