Search code examples
apache-nifi

how to get data in double quotes after splitJson Processor?


How can I get data in double quotes after using splitJson processor.

I am using SplitJson for splitting this array, but the data I am getting in Flowfiles is without double quotes while I need data to be in double quotes.

This is the array

["Consultation" ,"X","Y", "Z"]

This is SplitJSON processor Configuration enter image description here

This is the Flowfile Data, I want this in double quotes as "Consultation". Ho wcan I get so? enter image description here


Solution

  • Use a ReplaceText processor:

    • Search Value: (?s)(^.*$)
    • Replacement Value: "$1"

    Input:

    Consultation
    

    Output:

    "Consultation"