I have a JSON:
{
"error" : {
"code" : "validation_failed",
"message" : "Validation failed",
"fields" : {
"date_end" : {
"code" : "min_value",
"message" : "Value is less than minimum allowed"
}
}
}
}
date_end can be date_start, name, geo. I need to extract message, I did this:
[
{
"operation": "shift",
"spec": {
"error": {
"fields": {
"date_end|date_start|name|geo": {
"message": "message"
}
}
}
}
}
]
But also I need this json object name inside message. So I expect to get this result:
{
"message": "date_end|Value is less than minimum allowed"
}
Before message I need to add this json object name. How can I do this?
You can use the following transformation specs :