Skip to content

Wildcards in query argument to fparse() #95

@gacolitti

Description

@gacolitti

Is it possible to add the ability to use wildcards in the query arg to fparse() and fload()?

For example:

json <- '{
  "entries": [
    { "entryKey": "12345" },
    { "entryKey": "67890" },
    { "entryKey": "54321" }
  ]
}'

# Extract the entryKey from the first entry
RcppSimdJson::fparse(json, query = "/entries/0/entryKey")

# Extract the entryKey from the second entry
RcppSimdJson::fparse(json, query = "/entries/1/entryKey")

# Extract the entryKey from the third entry
RcppSimdJson::fparse(json, query = "/entries/2/entryKey")

# Extract all entry keys using wildcard (doesn't work)
# RcppSimdJson::fparse(json, query = "/entries/*/entryKey")

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