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

Could we please add to the scripts folder.... #28

Open
dPys opened this issue Jul 3, 2020 · 1 comment
Open

Could we please add to the scripts folder.... #28

dPys opened this issue Jul 3, 2020 · 1 comment

Comments

@dPys
Copy link
Contributor

dPys commented Jul 3, 2020

Users are going to want a set of simple API's for saving and retrieving all kinds of metadata from the .json. Otherwise, folks might not catch on?

@dPys
Copy link
Contributor Author

dPys commented Jul 3, 2020

And maybe start by building off of this:

def seek_keys(d, key_list):
    for k, v in d.items():
        if k in key_list:
            if isinstance(v, dict):
                print(list(v.keys())[0])
            else:
                print(str(v))
        if isinstance(v, dict):
            seek_keys(v, key_list)

seek_keys(json_dict, ['label'])
seek_keys(json_dict, ['center'])

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

1 participant