yaml multi document markers #237
-
|
How to select specific YAML document markers? For example, ---
foo: bar
---
foo: baz
---
foo: spamHow to tell |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
When reading multiple documents dasel stores them internally as a list, allowing you to access them as follows: $ echo '---
foo: bar
---
foo: baz
---
foo: spam' | dasel -r yaml '.[1].foo'
baz |
Beta Was this translation helpful? Give feedback.
-
|
@TomWright I'm trying to do the same with v3 but get Is there a way to achieve the same in v3? My use case is: iterating through a multi-document yaml and outputting each doc to a separate file. |
Beta Was this translation helpful? Give feedback.
When reading multiple documents dasel stores them internally as a list, allowing you to access them as follows: