Request: Option to return the "path" to the key and the "nested dict" that represents the value #38

Open
opened 2020-10-28 18:37:59 -04:00 by russellballestrini · 1 comment
russellballestrini commented 2020-10-28 18:37:59 -04:00 (Migrated from git2.unturf.com)

Created by: alxgross

Hello,

great lib. May I suggest to add a feature that would give me the path to the found value(s) as well.

*Created by: alxgross* Hello, great lib. May I suggest to add a feature that would give me the path to the found value(s) as well.
russellballestrini commented 2021-03-18 04:24:30 -04:00 (Migrated from git2.unturf.com)

Created by: vipulgupta-cpi

Hi,

Very helpful library. I'll also like to put the same request for getting the absolute path of the found values. In addition to this if possible can we also have lookup/search based on absolute path.

For example

document = [ { 'taco' : 42 } , { 'salsa' : [ { 'burrito' : { 'taco' : 69 } } ] } ]
from nested_lookup import nested_lookup
print(nested_lookup('salsa.burrito.taco', document))
[69]

*Created by: vipulgupta-cpi* Hi, Very helpful library. I'll also like to put the same request for getting the absolute path of the found values. In addition to this if possible can we also have lookup/search based on absolute path. For example >>> document = [ { 'taco' : 42 } , { 'salsa' : [ { 'burrito' : { 'taco' : 69 } } ] } ] >>> from nested_lookup import nested_lookup >>> print(nested_lookup('salsa.burrito.taco', document)) [69]
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: python/nested-lookup#38
No description provided.