Skip to content

Error in any(generator;condition) #2073

@aio-su

Description

@aio-su

Describe the bug
Some conditions lead any(generator;condition) to wrong result.
Use any() for same array input lead to right result
To Reproduce
jq -n '{"a":"1","b":"2","c":"3"}|any(keys[]|tostring?;true)' => false
jq -n '{"a":"1","b":"2","c":"3"}|any(keys[]|tostring;true)' => true
jq -n '{"a":"1","b":"2"}|any(keys[]|tostring?;true)' => true
jq -n '{"a":"1","b":"2","c":"3"}|[keys[]|tostring?|true]|any' => true
Expected behavior
Environment (please complete the following information):
uname -all
=>
Linux LAB-hub1 4.15.0-23-generic #25~16.04.1-Ubuntu SMP Fri May 25 04:50:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

jq --version
=>
jq-1.5-1-a5b5cbe

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions