DEV Community

Jeff
Jeff

Posted on Originally published at powerduck.com

Hoppscotch Response Search and Filter: A Practical Guide

Quick answer: Hoppscotch has no global search across responses. The filter box in the response section runs a jq expression against the current JSON body to slice, reshape, and extract values. It works only on that one JSON response, so it cannot search headers, raw or HTML bodies, history entries, or several responses at once, and it does not produce a pass or fail.

What the filter actually is

The filter is a jq field under the response body. jq is the command-line JSON processor, and Hoppscotch uses the same language to transform the payload in front of you. A plain dot returns the whole object; longer expressions walk keys, expand arrays, and pick records.

One migration detail catches returning users: filtering used to speak JSONPath, and Hoppscotch replaced it with jq. Old JSONPath filters have to be rewritten, since the syntaxes are not interchangeable. The changelog frames the switch as a move to a more expressive query language.

Where the filter works and where it stops

The word "filter" suggests broad reach, but the scope is narrow. Here is the honest map.

Target Can the jq filter reach it? Why
Current JSON body Yes This is the input the expression runs against
Nested keys and arrays in that body Yes jq walks the full object tree
Response headers No Headers sit in a separate tab, not the jq input
Raw, HTML, or XML view No jq expects parsed JSON, not markup or text
Earlier history entries No Each response is separate; nothing is indexed
Multiple responses together No The field sees one response at a time

Because the scope is one in-memory response, the expression is not saved; re-send the request and you enter it again. It never touches the server, since the transformation happens in the viewer, so the API and its stored data stay unchanged.

Filtering is not asserting

A jq filter and a test assertion look related because both narrow in on a value, but they do different jobs. The filter only changes what is displayed. If the expression narrows a thousand-record list down to three active users, that is a view you read, not a check the tool remembers.

Assertions live in the test script and show up in the Test Results section. There you write expectations against the status code, response time, headers, and body fields, and each one reports a pass or fail. A desktop tool such as Powerduck takes the same side on this line: a scenario runs ordered requests and asserts status, headers, and response fields at every step as repeatable checks, rather than relying on a one-time filtered view. If you need a condition to hold on every run, write the assertion; use jq when you want to inspect or pull a value by hand.

For more head-to-head detail across the two products, see the Hoppscotch comparison hub.

jq patterns worth memorizing

The fastest way to get value is to learn a handful of expressions that cover most inspection work. Start from the whole object and add one operation at a time.

.
.data
.items[]
.items | length
.items[].id
.items[0:3]
keys
Enter fullscreen mode Exit fullscreen mode

For conditional picks and reshaping, pipe the array through a filter or map. These are the two forms people reach for most often.

.items[] | select(.active == true)
.items | map(.name)
Enter fullscreen mode Exit fullscreen mode

The first expands the array and keeps records where active is true; the second turns the array into a flat list of names. Add a field lookup after a select to pull one value, and use length before and after a filter to see whether a condition matched nothing. An empty result is a valid answer, not an error, so checking the count keeps you from trusting a blank screen.

Frequently asked questions

Can I search response headers with the filter? No. It runs only against the JSON body. Headers are a separate tab, so scan them directly or assert on a header in a test.

Why does my old JSONPath filter no longer work? Hoppscotch replaced JSONPath with jq for response filtering. Rewrite the expression in jq syntax, since a JSONPath path does not map one-to-one and will not run.

Does a jq filter change the response or get saved with the request? No. It changes only the current view, never the server data, and is not persisted, so re-sending means entering it again.

The bottom line

Treat the filter as a focused jq scratchpad for one JSON body, and it pays off when you cut large payloads down to the values you care about. The mistake is expecting it to act like a search engine or test suite. It neither indexes across responses nor records pass or fail, so use jq to inspect and extract, and use written assertions when a condition has to hold on every run.

Top comments (0)