After look at documentation: https://jsonquerylang.org/reference/#uniq `jsonquery([null, false, 0, "", null, false, 0, ""], 'uniq() | size()') // should be 4` It is not ;-) In javascript [...new Set([null, false, 0, "", null, false, 0, ""])].length working well!
Activity
josdejong commentedon May 28, 2025
Thanks for reporting, that's not good. It may be related to the nullish values. I'll work out a fix asap.
fix: #24 function `uniq` not working correctly with nullish types
github-actions commentedon May 28, 2025
🎉 This issue has been resolved in version 5.0.2 🎉
The release is available on:
Your semantic-release bot 📦🚀
fix: #24 operators `in` and `not in` not working correctly with nulli…
github-actions commentedon May 28, 2025
🎉 This issue has been resolved in version 5.0.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
josdejong commentedon May 28, 2025
It was a classic JS issue, whoops! The same issue was the case in operators
inandnot in, fixed now inv5.0.3.igor-mariscak commentedon May 28, 2025
Fast and great fix. Thank you.
[-]not working as expected[/-][+]Function `uniq` not working as expected[/+]josdejong commentedon May 28, 2025
The Python version had a similar issue (fixed now). It turns out in Python
False == 0returnsTrue, a similar pitfall like JavaScript.