Skip to content

🧩 Feature Request: Add Support for JMESPath in JSON Response Parsing #8817

@azadhussainster

Description

@azadhussainster

Summary:

Introduce JMESPath support as an advanced option for querying and transforming JSON response bodies directly within Insomnia. This would enhance usability for users who need to extract complex data from API responses.

🧠 Motivation
Insomnia is widely used for API development and debugging, often requiring users to parse and inspect deeply nested JSON responses. While basic JSONPath or manual inspection can work, JMESPath offers a powerful, lightweight, and declarative syntax that enables:

Rich queries on complex JSON structures

Conditional filtering, slicing, and projections

A familiar standard used by AWS CLI and other tools

Adding JMESPath would greatly improve productivity for users dealing with large and complex JSON responses.

📚 Use Case Example

Sample JSON response

[
  {
    "id": 1,
    "name": "Leanne Graham",
    "username": "Bret",
    "email": "Sincere@april.biz",
    "address": {
      "street": "Kulas Light",
      "suite": "Apt. 556",
      "city": "Gwenborough",
      "zipcode": "92998-3874",
      "geo": {
        "lat": "-37.3159",
        "lng": "81.1496"
      }
    },
    "phone": "1-770-736-8031 x56442",
    "website": "hildegard.org",
    "company": {
      "name": "Romaguera-Crona",
      "catchPhrase": "Multi-layered client-server neural-net",
      "bs": "harness real-time e-markets"
    }
  },
  {
    "id": 2,
    "name": "Ervin Howell",
    "username": "Antonette",
    "email": "Shanna@melissa.tv",
    "address": {
      "street": "Victor Plains",
      "suite": "Suite 879",
      "city": "Wisokyburgh",
      "zipcode": "90566-7771",
      "geo": {
        "lat": "-43.9509",
        "lng": "-34.4618"
      }
    },
    "phone": "010-692-6593 x09125",
    "website": "anastasia.net",
    "company": {
      "name": "Deckow-Crist",
      "catchPhrase": "Proactive didactic contingency",
      "bs": "synergize scalable supply-chains"
    }
  },
  {
    "id": 3,
    "name": "Clementine Bauch",
    "username": "Samantha",
    "email": "Nathan@yesenia.net",
    "address": {
      "street": "Douglas Extension",
      "suite": "Suite 847",
      "city": "McKenziehaven",
      "zipcode": "59590-4157",
      "geo": {
        "lat": "-68.6102",
        "lng": "-47.0653"
      }
    },
    "phone": "1-463-123-4447",
    "website": "ramiro.info",
    "company": {
      "name": "Romaguera-Jacobson",
      "catchPhrase": "Face to face bifurcated interface",
      "bs": "e-enable strategic applications"
    }
  }
]

JMESPath Query:

[].{user_id: id, user_city: address.city}

Result:

[
  {
    "user_id": 1,
    "user_city": "Gwenborough"
  },
  {
    "user_id": 2,
    "user_city": "Wisokyburgh"
  },
  {
    "user_id": 3,
    "user_city": "McKenziehaven"
  }
]

🔧 Proposed Implementation

  • Add a dropdown menu in "Insomnia Preferences" to select the preferred JSON parser.
  • Integrate the Typescript JMESPath implementation ([@metrichor/jmespath]https://www.npmjs.com/package/@metrichor/jmespath)).
  • Allow users to input a JMESPath expression and see the evaluated output.

✅ Expected Outcome

  • Users can enter a JMESPath expression in the response panel.
  • The result is computed and shown as a derived JSON or string.

🧪 Next Steps

I plan to:

  • Fork the repository
  • Work on this feature in a new branch
  • Submit a pull request with implementation.

Would love feedback from maintainers before implementation begins—especially around UX and preferred integration point in the UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions