Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONPath in extension not working as expected #1307

Open
mvhenderson opened this issue Oct 9, 2024 · 0 comments
Open

JSONPath in extension not working as expected #1307

mvhenderson opened this issue Oct 9, 2024 · 0 comments

Comments

@mvhenderson
Copy link

  • REST Client Version: v0.25.1
  • VSCode Version: Version: 1.93.1
  • OS Version: macOS Sequoia 15.0

Extension JSONPath version is "jsonpath-plus": "^0.20.1"

Latest version of the jsonpath-plus appears to be v10.0.0 github wiki

Looking to either update the module or provide guidance how to structure the JSONPath expression to work with the extesion version.

Steps to Reproduce:

  1. Create a response that returns the following JSON
  {
    "items": [
      {
        "_id": "23",
        "_title": "Validation"
      },
      {
        "_id": "23||23",
        "_title": "Validation.TestEntity"
      },
      {
        "_id": "23||23||39",
        "_title": "Validation.TestEntity.field1"
      },
      {
        "_id": "23||23||40",
        "_title": "Validation.TestEntity.field2"
      }
    ]
  1. The following expression should return 23||23||39 but does not
@fieldId = {{reset.response.body.$.items[?(@._title=='Validation.TestEntity.field1')]._id}}
  1. However it does on jsonpath-plus demo page
image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant