Created on 06-19-2017 07:57 PM - edited 08-17-2019 07:15 PM
The following configuration of ReplaceText should work for you:
where the Search Value is the following:
[\[\]](\{|\})This matches [{ or ]} (and also [} and ]{ which shouldn't show up if your input is valid JSON) and replaces it with whichever curly brace it found. Note that this is a fairly specific solution, where the array is the last element of an object (i.e. the end pattern is not the end-of-object followed by end-of-array, rather the reverse).
A more forgiving solution (for your input JSON) might be to use the following Chain spec in a JoltTransformJSON processor:
[
{
"operation": "shift",
"spec": {
"result": {
"curves": {
"*": {
"@": "result.curves"
}
},
"*": "result.&"
},
"*": "&"
}
}
]This "hoists" the object in the 1-element array up one level, achieving the same result as the ReplaceText pattern above.