Given the following input:
[
{
"order": "SI867-5309"
},
{
"order": ""
},
{
"order": "SI555-1212"
},
{
"order": {
"status": "Bad"
}
}
]
I want to use jolt to translate to :
[
{
"order": "SI867-5309"
},
{
"order": "SI555-1212"
}
]
I have gotten close with:
[
{
"operation": "shift",
"spec": {
"*": {
"order": {
"SI*": "@1"
}
}
}
}
]
but thats not it, because it although it does filter out the values starting with SI, it then makes the values into the keys. I think I'm missing something obvious...