Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically choosing a YAML document path? #194

Open
mzagrabe opened this issue Dec 4, 2022 · 1 comment
Open

Dynamically choosing a YAML document path? #194

mzagrabe opened this issue Dec 4, 2022 · 1 comment

Comments

@mzagrabe
Copy link

mzagrabe commented Dec 4, 2022

Greetings,

Thank you for yaml-rust!

I see in the docs:

assert_eq!(doc["foo"][0].as_str().unwrap(), "list1");

I would like to do something like:

let key = "[foo][0]";
assert_eq!(doc.dynamic_lookup(key).unwrap(), "list1");

Do you know if it is possible with yaml-rust?

Thanks!

@volfco
Copy link

volfco commented Nov 13, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants