nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l vic <lvic4...@gmail.com>
Subject merging flowfile content and values?
Date Wed, 01 May 2019 15:34:05 GMT
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

Mime
View raw message