Skip to content

cherry picking macro #54

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])?)
)()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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