Suggestion: option to search for keys that have string in them #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: blark
I have a dict that uses "Email" and "Email__other" it would be great if you could add an option to search "if in key" instead of if key is equal to.
Thanks for putting this in pip. Saved me some time!
Created by: russellballestrini
Interesting idea. Another option is creating a new function like
multi_nested_lookupthat changeskeytokeysand does anif k in keys. In this case we would recurse once and collect values for any number of deeply nested keys in one go. The returned result would have to be a dictionary of lists, instead of a list I think.Created by: russellballestrini
On second thought, I think your way is easier to implement and keeps the existing return behavior. I'll see what I can come up with today.
Created by: russellballestrini
@blark let me know if this works for you and I'll cut a release on pypi:
https://github.com/russellballestrini/nested-lookup#wild
Created by: blark
Wow, you're quick ;) I'll give it a shot! Thanks.
Created by: blark
Works great. Thanks again.