I have a simple JSON object that may have the following structure:
{
"data":{
"k1":"v1",
"k2":"v2"
}
}
The object can contain any number of key-value pairs, but it will always be flat, meaning there are no nested objects. I'm looking to construct a string in the format of "k1:v1:k2:v2"
using JMESPath. Is it possible to achieve this using JMESPath?
I was trying to use
[data.keys(@),data.values(@)].join(':',[])
But this results in:
"k1:k2:v1:v2"