Skip to content

cherry picking macro #54

@jiftechnify

Description

@jiftechnify

Cherry pick nested value from JSON-ish data and collect results into a tuple. Easily implementable in terms of query_value, but we need some optimization?

syntax draft:

pick_values!(|obj| (.foo, .bar, .baz[0]))

->

// Some((...)) if all query results in Some, otherwise None
(|| Some(
    (query_value!(obj.foo)?, query_value!(obj.bar)?, query_value!(obj.baz[0])?)
)()

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