Agent-Hellboy / trace-dkey

Python library to trace path of a particular key inside a nested dict
MIT License
7 stars 5 forks source link

Return path inside recursive trace function #7

Closed zluipaiva closed 2 years ago

zluipaiva commented 2 years ago

Related to: #1

The __trace_key function was updated to return the found paths instead of printing. Now it uses an array of paths that gets updated every time the key is found.

I'm storing each path as an array of dictionary keys so we could do something like: https://stackoverflow.com/a/14692747/16586258

Agent-Hellboy commented 2 years ago

please change README as well to reflect these changes, and add a section named general info why we are returning list of keys

I'm storing each path as an array of dictionary keys so we could do something like: https://stackoverflow.com/a/14692747/16586258

Agent-Hellboy commented 2 years ago

Thanks @zluipaiva everything looks good, just update the README

zluipaiva commented 2 years ago

@Agent-Hellboy done! just realized a small bug, I will open in a new issue because it's already in production

Agent-Hellboy commented 2 years ago

I see, thanks man