Created on 10-29-2020 08:31 AM - edited 10-29-2020 02:55 PM
UPDATE: If you ever need to modify a record use this solution: https://community.cloudera.com/t5/Support-Questions/NiFi-UpdateRecord-processor-is-not-updating-JSON...
ORIGINAL question:
How can I extract a string nested in the value of a JSON? For the status key below, I only want the value Active, instead of MapRecord[{current_status=Active}].
Original JSON
{
"indicator": "147.183.200.154",
"timestamp": 1577742090000,
"status": "MapRecord[{current_status=Active}]"
}
Desired final JSON
{
"indicator": "147.183.200.154",
"timestamp": 1577742090000,
"status": "Active"
}
Created 10-31-2020 07:27 AM
Refer the following template
https://drive.google.com/file/d/1e1q8xm-65WHHwGNsxyeRUSkRIw7ETO4B/view?usp=sharing
Created 10-31-2020 07:27 AM
Refer the following template
https://drive.google.com/file/d/1e1q8xm-65WHHwGNsxyeRUSkRIw7ETO4B/view?usp=sharing
Created on 11-02-2020 05:32 AM - edited 11-02-2020 05:32 AM
Thanks @suraj143
I ended up using an UpdateRecord, but your approach with a JoltTransformJSON also works.