sampler icon indicating copy to clipboard operation
sampler copied to clipboard

textbox keeps previous output after getting empty result from jq

Open DmitryAndreyeff opened this issue 3 years ago • 0 comments

Hi, I'm getting weird behaviour with jq, which looks like a bug. sampler config yaml

textboxes:
  - title: Running Jobs
    rate-ms: 2000
    sample: cat example.json | jq -r '.[] | select (.status == "running") | .ID'

example.json

[
  {
    "ID": 1,
    "status": "stopped"
  },
  {
    "ID": 2,
    "status": "running"
  }
]

Scenario

  1. When running sampler the textbox shows "2" as expected.
  2. Change 2nd status "running" to "stopped" and save example.json.
  3. The textbox keeps showing "2".
  4. Expected: empty textbox

DmitryAndreyeff avatar Sep 11 '22 06:09 DmitryAndreyeff