Skip to content

Instantly share code, notes, and snippets.

@mateothegreat
Created December 10, 2019 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mateothegreat/435cbefcb09a8cd78a05594821d187c9 to your computer and use it in GitHub Desktop.
Save mateothegreat/435cbefcb09a8cd78a05594821d187c9 to your computer and use it in GitHub Desktop.
cat test.json| jq 'to_entries[] | select(.value | index("group3") | not)'
{
"name@domain.com": [
"group1",
"group2",
"group3"
],
"name2@domain.com": [
"group1",
"group2"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment