How can i use yaml::read_yaml()
to produce a true toplevel OR convert the current nested list.
Simple regex
yaml::read_yaml(text = "
BOB:
anotherBOB:
- abcd
JOHN:
notBOB:
- zyx
")
yields:
$BOB
$BOB$anotherBOB
[1] "abcd"
$JOHN
$JOHN$notBOB
[1] "zyx"
My final output should look as such
BOB
BOB$anotherBOB
[1] "abcd"
JOHN
JOHN$notBOB
[1] "zyx"
1