-
I have a yaml file which looks like this. How do I select any elements in this example? I feel that since there is no root it might not be possible? ---
- id: run1
execute-command: "C:\\_dev\\webhook-demo\\run1.cmd"
command-working-directory: "C:\\_dev\\webhook-demo\\"
- id: start
execute-command: "C:\\_dev\\webhook-demo\\start.cmd"
include-command-output-in-response: true
- id: queryuser
execute-command: "C:\\_dev\\webhook-demo\\query_user.cmd"
include-command-output-in-response: true
- id: queryprocess
execute-command: "C:\\_dev\\webhook-demo\\query_process.cmd"
include-command-output-in-response: true stuff I tried that did not work
SolutionTry using double quotes or no quotes. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Hey @mark05e, The selector I'd expect this to work with is You can see this working here: https://dasel.tomwright.me/s/4ec7a657-8f83-4843-bab9-eb5e517b1198 Or here: $ echo '---
- id: run1
execute-command: "C:\\_dev\\webhook-demo\\run1.cmd"
command-working-directory: "C:\\_dev\\webhook-demo\\"
- id: start
execute-command: "C:\\_dev\\webhook-demo\\start.cmd"
include-command-output-in-response: true
- id: queryuser
execute-command: "C:\\_dev\\webhook-demo\\query_user.cmd"
include-command-output-in-response: true
- id: queryprocess
execute-command: "C:\\_dev\\webhook-demo\\query_process.cmd"
include-command-output-in-response: true' | dasel -p yaml -s '[*].id' -m
run1
start
queryuser
queryprocess It does actually look like your last attempt should have worked - what output did you get? |
Beta Was this translation helpful? Give feedback.
-
This is what I got
|
Beta Was this translation helpful? Give feedback.
This is what I got