I have an object like this:
{
"a" : 1,
"b" : {
"c" : {
"c1" : "abc",
"source" : "abcxyz"
},
"d" : {
"d1" : "abcd",
"source" : "abcxyz"
},
"e" : {
"e1" : "abcde",
"source" : "abcxyz"
}
}
}
My expectation is
{
"a" : 1,
"b" : {
"c" : {
"c1" : "abc"
},
"d" : {
"d1" : "abcd"
},
"e" : {
"e1" : "abcde"
}
}
}
I want to remove "source" properties. How can I do that without specifying keys "c", "d" or "e", because they are dynamic.
Here is another solution
del( .b[].source )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With