i have a json file like this one below and try to remove the array's brackets at the beginning and the end
[
{
"a": "1",
"b": "2"
}
]
and i only want the map:
{
"a": "1",
"b": "2"
}
anyone knows which processor to use and how to configure? Thanks, Lukas
CodePudding user response:
You can use SplitJson Processor.
I've used the following settings for the Processor.
Or you can also use EvaluateJsonPath. Here is my configuration for EvaluateJsonPath.
CodePudding user response:
An alternative way might be adding a JoltTransformJSON processor which will contain this spec
[
{
"operation": "shift",
"spec": {
"*": ""
}
}
]