Customer Portal

Comments 1

  • Avatar
    Vladimir Barton
    Comment actions Permalink

    Hello Aadharsh,

    Unfortunately, it is currently not possible to omit the "SourceCheck" array easily given the way how CloverDX is currently designed to work. There is already an improvement suggestion ticket logged in our JIRA but it hasn't made its way to the software yet. If it was a single value element (as opposed to an array), you could take advantage of the "Writer null value" property and set it to false. However, if you really need to remove the entire array completely you would have to arrange some sort of a workaround solution.

    One of the possible workaround options would be to write the JSON data as you normally would including the unwanted empty array field but instead of outputting directly to a file you would write data to an output edge. JSONWriter File URL would be:


    Then, you would go on to use the Map component and remove the "SourceCheck" array by using the replace() CTL function. For instance:

    $out.0.myJsonOutput = replace($in.0.myJsonOutput , '"SourceCheck":\[\],', "");

    Lastly, you would simply write to modified JSON data by using FlatFileWriter into a file.

    Best regards.

Please sign in to leave a comment.