Member since
02-12-2024
2
Posts
1
Kudos Received
0
Solutions
02-13-2024
03:09 PM
1 Kudo
Thanks! This scripting approach looks to be working. I'll be sure to look into the ExecuteScript processor more 🙂
... View more
02-12-2024
03:02 PM
Hello, I have nested JSON objects coming in a flowfile, looking like this (example): { "a" : 1, "b" : {"asd" : 156, "bed" : "lalala"}, "c" : "abba", "d" : {"add" : 872, "bla" : "bebebe"} } I'd like to put double quotes around every nested json object and also escape any double quote inside of that nested json. The result would look like this: { "a" : 1, "b" : "{\"asd\" : 156, \"bed\" : \"lalala\"}", "c" : "abba", "d" : "{\"add\" : 872, \"bla\" : \"bebebe\"}" } I tried doing a replacetext with a regex like this: (?<=:.*\{[^}]*)" However this is utilizing a negative lookbehind with varying length and it seems this isn't supported in java/nifi. What would be the best approach here? Thanks!
... View more
Labels:
- Labels:
-
Apache NiFi