JQ example

Simple GET request that will show various JQ operations.

name: JQ Example
stages:
  - name: get products request
    request:
      url: "https://dummyjson.com/products"
      method: GET
    assert:
      status: 200
      body:
        - select: .products | length
          want: 50

        - select: .products[0].id | isnormal
          want: true

        - select: .products[0].images | length
          want: 5

        - select: .products[] | select(.title == "iPhone 9") | .id
          want: 1