I have a JSON like
{
"campaign_key": 316,
"client_key": 127,
"cpn_mid_counter": "24",
"cpn_name": "Bopal",
"cpn_status": "Active",
"clt_name": "Bopal Ventures",
"clt_status": "Active"
}
Expected output
1st JSON :
{
"campaign_key": 316,
"client_key": 127,
"cpn_mid_counter": "24",
"cpn_name": "Bopal",
"cpn_status": "Active"
}
2nd JSON:
{
"clt_name": "Bopal Ventures",
"clt_status": "Active"
}
How do I acheive this by using NIFI? Thanks.


Karthik,
Use
EvaluateJsonPathprocessor to get those all json Values by using its keys.Example:
$.campaign_keyfor gets compaign key value and$.clt_namefor get clt name.Like above one you can get all jsons.
Then use ReplaceText Processor for convert single json into two jsons.
It will convert single json into two jsons.
Hope this helpful and let me know if you have issues.