Dasel’s equivalent to JQ’s [] #144
Answered
by
TomWright
sergeevabc
asked this question in
Q&A
-
Dear Tom, Source: test.txt $ jq -r ".[].ua" test.txt
Mozilla/5.0 (Windows; U…
Mozilla/5.0 (Android 2.2…
$ dasel --plain -p json ".[].ua" -f test.txt
Error: could not query node: could not find value: no value found for selector: .[] I tried |
Beta Was this translation helpful? Give feedback.
Answered by
TomWright
Jun 2, 2021
Replies: 1 comment
-
You'll want to use the all indexes selector for this: $ dasel --plain -p json ".[*].ua" -m -f test.txt
Mozilla/5.0 (Windows; U; Windows CE; Mobile; like Android; ko-kr) AppleWebKit/533.3 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.3 Dorothy
Mozilla/5.0 (Android 2.2; Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
TomWright
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll want to use the all indexes selector for this: