yamafaktory / jql

A JSON Query Language CLI tool

Home Page:https://crates.io/crates/jql

Repository from Github https://github.comyamafaktory/jqlRepository from Github https://github.comyamafaktory/jql

lens conjunction doesn't work

yamafaktory opened this issue · comments

Discussed in #171

Originally posted by LLFourn August 4, 2022
I would expect the following to output only the second element:

printf '[{"cond1": "false", "cond2": "true"}, {"cond1": "true", "cond2": "true"}]' | jql '.[]|={"cond1":"true"}|={"cond2":"true"}'

but it outputs

[
  {
    "cond1": "false",
    "cond2": "true"
  },
  {
    "cond1": "true",
    "cond2": "true"
  }
]

How do you do a conjunction on the lens conditions?