Access to a nested element from a "Path"
yellowbean opened this issue · comments
Shawn Zhang commented
There is a Path-alike
: ['articles', ny, 'content']
in the transform function.
very_short_news = news_paper.transform(['articles', ny, 'content'], lambda c: c[:15] + '...' if len(c) > 15 else c)
Could we have something Path-alike
to Query elements
news_paper.query(['articles', ny, 'author']) == ['Sara', 'Steve']
the list can be easily built and compose to other type of path points to elements of interest