Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to implement condition to generate the Json conditional node when ID_NUMBER is not null or empty using Tmap and TwriteJsonfield
Hello,
tWriteJSONField does not support conditional node creation directly. Conditional logic must be applied before JSON generation.
In tMap, set the output field to null when ID_NUMBER is null or empty:
row1.ID_NUMBER != null && !row1.ID_NUMBER.trim().isEmpty()? row1.ID_NUMBER: null
Map this field in tWriteJSONField and enable Remove null fields.When the value is null, the corresponding JSON node is not created.
Thanks,
Gourav