Support Questions
Find answers, ask questions, and share your expertise

Take the attribute value (Jason Data) and replace a specific value in flow file (Jason data) content

I have a flow file content like below

{ "atct": [ { "flag": "Y", "atct_no": 123456789, "debr" : "EAR" }, { "flag": "Y", "atct_no": 234567891, "debr" : "EYE" } ] }

And then I have an attribute Attr_X which has value - [ "2020202020", "1010101010"]

I would like to replace "atct_no" values in flow file content and I need it to look like (if possible with out splitting the flow file)

{ "atct": [ { "flag": "Y", "atct_no": 2020202020, "debr" : "EAR" }, { "flag": "Y", "atct_no": 1010101010, "debr" : "EYE" } ] }


Hi @Abdelkrim Hadjidj

Thank you very much for the quick reply. Now I did go through the update processor. The issue I am unable to figure out is, how to reference the array of Attribute values in update processor. To my initial question there are two records in Jason file and 2 values in attribute "Attr_X". So I want the first value of "atct_no" which is 123456789 to be replaced by 2020202020, and in the same way 234567891 to be replaced by 1010101010.

Thank you,


Hi @Raja Chowdary

You can add an UpdateAttribute to split the attribute into two attributes like this. Then you can use myatt1 or myatt2 separately.


; ;