Replies: 1 comment
-
parseAllDocuments(...).map(doc => doc.toJS()) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ind1go
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got a multi-document file, with the documents separated by
...
. What I'd like to do is to a simpleparse
, to get simple objects representing only the data structure, that I can assert as my own TypeScript type.However, because it's multi-document, I have to use
parseAllDocuments()
(due toYAMLParseError: Source contains multiple documents; please use YAML.parseAllDocuments()
), which gives me the much more complex structure with all the metadata.Is there a way to get from the more complex structure produced by
parseAllDocuments()
to an array of the type of structure produced byparse
?Beta Was this translation helpful? Give feedback.
All reactions