Skip to content

Unsure how to translate from jq/jello: not-equals test, get multiple values from each of multiple maps #146

Answered by TomWright
AndydeCleyre asked this question in Q&A
Discussion options

You must be logged in to vote

As of v1.18.0 you can do this with the following command:

dasel -f test.json -m
  --format '{{ .name }}{{ newline }}{{ .version }}{{ newline }}{{ .latest_version }}'
  '.(name!=setuptools)(name!=six)(name!=pip)(name!=pip-tools)'

This uses a multi select to target the items to be included in the result and then uses the format flag to give the desired output.

The related documentation can be found here: https://daseldocs.tomwright.me/usage/flags/format


Hey @AndydeCleyre, thanks for raising this discussion it's highlighted some areas than dasel is lacking features as of now.

Currently there are 2 issues here:

  • Dasel doesn't have a negative comparison operator built in yet
  • Dasel doesn't pro…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TomWright
Comment options

Answer selected by TomWright
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants