You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by l vic <lv...@gmail.com> on 2019/05/01 15:34:05 UTC

merging flowfile content and values?

Hello,

I have flow file with “root attributes” such as
id=‘9b892935-c0e7-42ba-958b-191138c71b39’, name=‘appliance1’ and json array
of user account info as content: [{“username”: “one”,
“create_date":1550500579036,
“role”: “tech lead”}, {“username”: “two”,  “create_date":1550500579100,
“role”: “user”}]

My question: how can i transform it into json object that uses both
attribute values as “root” values and content at “internal object”:

{ "id": "9b-892935-c0e7-42ba-958b-191138c71b39",

"name": "appliance1",

"account-info":  [{"username": "one",  "create_date\":1550500579036,
“role": "tech lead"}, {"username": "two",  "create_date\":1550500579100,
“role": "user"}]

}

Thank you,

-V