-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to iterate through all tables? #2
Comments
I can see the use for this but it's not so straightforward to implement since swift-toml is basically storing key/values in a flat structure after it's parsed. I'm working on a function that will allow you to grab all tables beneath a given key path. To grab all tables at the root level:
or, to get all the tables nested within table1:
It will take me a day or two to get this functionality in. |
Awesome! |
Added support for iterating over all tables at a given level with |
Nice, thanks! |
I have a use case where I would need to loop over all root-level tables to check whether each table contains a certain key. Currently this doesn't seem to be possible.
I was previously using YamlSwift, where this was possible using the
dictionary
getter:It would be nice to have something similar in swift-toml, for example:
The text was updated successfully, but these errors were encountered: