I receive some json data which sometimes start with the first key within “json_data” variable containing a ‘:’, such as:
`
“json_data”: {
“key1:key2”: {
“key3”: [
“value31”,
“value32”,
“…”
]
}
}
`
The goal is to split “key1:key2” into 2 keys so that we end up with:
`
“json_data”: {
“key1”: {
“key2”: {
“key3”: [
“value31”,
“value32”,
“…”
]
}
}
}
`
The key names are completely variable so I also have no idea about how to implement the play condition so that this transformation is done only when the first key within “json_data” contains a single colon.
I am aware that a colon should not be part of any key, but I have no control over that.
Any suggestion?