Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
since_1995
Contributor III
Contributor III

Json Fomat Corrections in Talend

the input is given through Excel and my Json generated is as below:

{"documents":{"documents":[],"blanket_document":["f0033dc0-126b-40ba-89e0-d3061bdeda4c","1948335f-7dcd-410c-8f90-fc74c9fe5236","Individual_AI_Blanket_Endorsement.pdf"],"policy_document":["f0033dc0-126b-40ba-89e0-d3061bdeda4c","1948335f-7dcd-410c-8f90-fc74c9fe5236",[]],"pl_document":["f0033dc0-126b-40ba-89e0-d3061bdeda4c","1948335f-7dcd-410c-8f90-fc74c9fe5236",[]]}}                    here i don't want to generated the array if there is no pdf document. Is that possible??   

 

 

Actually I want it as below

 

{"documents":{"blanket_document":"f0033dc0-126b-40ba-89e0-d3061bdeda4c/1948335f-7dcd-410c-8f90-fc74c9fe5236/Individual_AI_Blanket_Endorsement.pdf"}}

Labels (2)
2 Replies
marceloveras
Contributor II
Contributor II

Could u send a sample of your job?  

 

Seems like you need :

 

tExtractJSONFields -> tJSONWriteFields (Rewriting your JSON object remapping it)

 

 

Best Regards

 

Marcelo Veras

since_1995
Contributor III
Contributor III
Author