Skip to content

Support dynamic lookups into other fields #34

@g-mark

Description

@g-mark

It would be interesting to use a jsonpath as the basis for a lookup into another object/array.

For example, given the json:

{
  "object": {
    "primaryKey": "foo",
    "foo": "bar",
    "other": "value"
  },
  "array": [
    { "foo": "one" },
    { "foo": "two" }
  ]
  "prefs" { "fieldname": "other" },
  "objIndex": 1
}

It might be handy to be able to:

  • $.object[ $.prefs.fieldname ] -> `"value"
  • $.object[ @.primaryKey ] -> "bar"
  • $.array[ $.objIndex ] -> { "foo": "two" }

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