I have the following input file:
{
"dic": {
"a": "",
"b": "",
"c": "",
"d": ""
},
"remove": {
"b": true,
"c": false,
"d": true
}
}
I want to remove with jq all elements of the dictionary dic which are also in the dictionary remove with the value true.
This would be the output:
{
"dic": {
"a": "",
"c": ""
},
"remove": {
"b": true,
"c": false,
"d": true
}
}
I am not sure how to do this. I would first need to clean the remove dic and only get the keys with the value true. Then I would need to somehow only delete these keys from dic.