Nebi Volkan Ünlenen
02/16/2024, 7:17 AM{
"id": "cluster_p-platform-test1mars"
}
Mapping json :
{
"request": {
"method": "POST",
"urlPath": "/kubernetes.Service/Get"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/grpc"
},
"transformers": [
"response-template"
],
"bodyFileName": "get.json"
}
}
Output:
{
"payload": {
"cluster": "p-platform-test1mars", // spliting id with _ and get [1] of data
}
}
Tom
02/16/2024, 9:53 AMregexExtract
and jsonPath
helpers e.g.
{{#trim}}
{{regexExtract (jsonPath request.body '$.id') '(.+)_(.+)' 'parts'}}
{
"payload": {
"cluster": "{{parts.1}}",
}
}
{{/trim}}
Nebi Volkan Ünlenen
02/16/2024, 11:16 AMManojkumar Kasiviswanathan
04/24/2024, 10:19 AM