Created
April 14, 2025 14:22
-
-
Save rjhornsby/732e0612491dd38d68054e6927cb02ea to your computer and use it in GitHub Desktop.
Find path to json key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From SO https://stackoverflow.com/questions/39800718/how-to-use-jq-to-find-all-paths-to-a-certain-key | |
jq -c 'paths | select(.[-1] == "foo")' < bar.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment