Files
yaak/plugins/filter-jsonpath
Gregory Schier eb3d1c409b Merge pull request #256
* Update environment model to get ready for request/folder environments

* Folder environments in UI

* Folder environments working

* Tweaks and fixes

* Tweak environment encryption UX

* Tweak environment encryption UX

* Address comments

* Update fn name

* Add tsc back to lint rules

* Update src-web/components/EnvironmentEditor.tsx

* Merge remote-tracking branch 'origin/folder-environments' into folder…
2025-09-21 07:54:26 -07:00
..
2025-09-21 07:54:26 -07:00
2025-07-20 06:42:33 -07:00
2025-07-20 06:42:33 -07:00

JSONPath

A filter plugin that enables JSONPath extraction and filtering for JSON responses, making it easy to extract specific values from complex JSON structures.

Screenshot of JSONPath filtering

Overview

This plugin provides JSONPath filtering for responses in Yaak. JSONPath is a query language for JSON, similar to XPath for XML, that provides the ability to extract data from JSON documents using a simple, expressive syntax. This is useful for working with complex API responses where you need to only view a small subset of response data.

How JSONPath Works

JSONPath uses a dot-notation syntax to navigate JSON structures:

  • $ - Root element
  • . - Child element
  • .. - Recursive descent
  • * - Wildcard
  • [] - Array index or filter

JSONPath Syntax Examples

Basic Navigation

$.store.book[0].title          # First book title
$.store.book[*].author         # All book authors
$.store.book[-1]               # Last book
$.store.book[0,1]              # First two books
$.store.book[0:2]              # First two books (slice)

Filtering

$.store.book[?(@.price < 10)]           # Books under $10
$.store.book[?(@.author == 'Tolkien')]  # Books by Tolkien
$.store.book[?(@.category == 'fiction')] # Fiction books
$..author                      # All authors anywhere in the document
$..book[2]                     # Third book anywhere
$..price                       # All prices in the document

Usage

  1. Make an API request that returns JSON data
  2. Below the response body, click the filter icon
  3. Enter a JSONPath expression
  4. View the extracted data in the results panel