ansibleguy76 / ansibleforms

A webapplication to create pretty advanced forms to run ansible playbooks or awx templates.
https://ansibleforms.com/
GNU General Public License v3.0
66 stars 10 forks source link

JQ filtering issue results to " " instead of boolean(false) #155

Closed nikos445 closed 6 months ago

nikos445 commented 6 months ago

Ansible Form JQ filtering always results to " " (empty string) when the result of JQ filtering is a boolean and results in false

e.g. Example: --> { data: [ false, false, false, false ] }

filtering with jq --> .data | any(. == true) --> will result in "" if false and true if there is any true inside the data array.

nikos445 commented 6 months ago

IMG_20240221_144806 Take a look on result here... This jq returns an array with false as example above.

nikos445 commented 6 months ago

adding filter like --> .data | any(. == true) | tostring will result to "false" but its not boolean.

ansibleguy76 commented 6 months ago

fixed in 5.0.1