Skip to content

Response Manipulation With Queries

Response manipulation with query language (JMESPath)

If you’d like to apply advanced manipulations before you return the API data, the modifier/jmespath allows you to apply JSON query language expressions

Let’s better illustrate the query language with an example. Your backend returns the following content:

{
  "students": [
    {"name": "Bill", "age": 23 },
    {"name": "Mary", "age": 16 },
    {"name": "Jessica", "age": 19 }
  ]
}
But you only need the names of those students who are over 18. You could apply an expression like this:
students[?age > `18` ].name
And the final output would be:

["Bill", "Jessica"]

Step 1:Go to the created endpoint select backends there we have option Advanced Response Manipulation(JMESPath) Enable it there we should pass the values as have taken examples above pass those values.

JMESPath