Open hugomf opened 4 years ago
I am new using Jolt, I think this tool is very helpful, I was misunderstanding the concept, I fixed it but is there any other simpler way?
{
"operation": "shift",
"spec": {
"parent": {
"filterfield": {
"*": { // saving the values ..
"@2": { // puts the pointer again in the root
"children": {
"*": {
"id": {
"&4": { // matching filterfield with the current child id
// points back to the root of the json tree
// and fetchs the matching children node.
"@2": "children"
}
}
}
}
}
}
}
}
}
}
Im trying to filter out a collection based on a value that is given in the parent, is it possible? if I hardcoded the value as FILTER is working, but if I'm setting the value from the parent attribute, it is not filtering
Input:
Spec:
expected output: