How can I rename a dynamic nested field name

I am currently looking at a camel project to get some stats from it. The following json response is what I get from jolokia. So I have a couple of issues I have to resolve although the most important is... I would like to rename the key "org.apache.camel:context=com.mycompany.component,name="component.route",type=routes" so that it is equal to "name=component.route". Note that this is nested too.

example response

"request": {
"mbean": "org.apache.camel:context=,name=,type=routes",
"type": "read"
"value": {
"org.apache.camel:context=com.mycompany.component,name="component.route",type=routes": {
"StatisticsEnabled": true,
"EndpointUri": "cxfrs://bean:rsServer",
"CamelManagementName": "com.ycompany.componentCntxt",
"ExchangesCompleted": 2,
"LastProcessingTime": 2069,
"ExchangesFailed": 0,

Hope someone can help with this.

Just to point you in the right direction, you need to use a ruby filter for this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.