Skip to content

Access to a nested element from a "Path" #287

@yellowbean

Description

@yellowbean

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions