-
|
Hello What is the best way to extract the first Example: -> The expected output is I tried
Thank you... |
Beta Was this translation helpful? Give feedback.
Answered by
harehare
Dec 28, 2025
Replies: 1 comment 1 reply
-
|
Hi! You can extract the first sh code block using: The -A flag aggregates all nodes into a single array, then filter selects for sh blocks, and first() returns the first one. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ruzickap
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! You can extract the first sh code block using:
The -A flag aggregates all nodes into a single array, then filter selects for sh blocks, and first() returns the first one.
However, I feel that the current syntax is a bit cumbersome, so I’m considering ways to make it easier to use in the future.