Hi I have following Json input but as you can see "sites" is coming as string but it is actually array of strings which is escaped with \
'''
{
"name":"test",
"Id" : "123",
"sites": "["BR","DM","LM","MC","WK","ZZ"]"
}
'''
What I need to transform above using Nifi is as follow
'''
{
"name":"test",
"Id" : "123",
"sites": ["BR","DM","LM","MC","WK","ZZ"]
}
'''
how we can do this?
You can use two ReplaceText processors, like here:
The first one will replace text "[ with [ while the second one will replace ]" with ]