is there a way to map a http response which is in json array to another json map also considering default values i.e when it is empty map a default key pair?
input
{
"key1": []
"key2":[x,y]
}
req output
{"table":[{
"a-key1": "deafault-value",
"a-key2": "x",
"b-key2": "y"
}]
}
You can use default keyword only in case of null but for blank and empty array you can use something like
assume payload is header or query params.
Hope this helps.