Convert a Map Field into an Array
If I have a flow file with the following JSON how can I
1) Evaluate "addresses" to determine if it is of type Array or type Map
2) If type Map then convert "addresses" into an array using native NiFi capabilities (i.e. no string parsing)?
{
"name": "John Doe",
"addresses": {
"work": {
"number": "123",
"street": "5th Avenue",
"city": "New York",
"state": "NY",
"zip": "10020"
}
}
}
This is what I need it to look like:
{
"name": "John Doe",
"addresses": [{
"work": {
"number": "123",
"street": "5th Avenue",
"city": "New York",
"state": "NY",
"zip": "10020"
}
}]
}
I appreciate the input and support! Thank you.

