In this post, we will see how to resolve Removing null keys from a json array of objects
I am pulling policies from an azure keyvault
Which returns some data like
Somehow I need to filter out the null permission objects, either by completely removing them or by replacing them with empty arrays. There could be any combination of policies. Is it possible to filter these out? I’ve been trying variations of jmespath and jq for hours and getting nowhere.
You’re looking for something like this:
If you have better answer, please add a comment about this, thank you!