How to query/filter by the value of a lightswitch In my news entries, I have a lightswitch field with the handle 'pinned'. I'm trying to query my news section for both pinned and unpinned news entries (true or false essentially), but I can't get consistent results with any of the following:

{% set pinnedNews = craft.entries().section('news').pinned('1').all() %}
{% set unpinnedNews = craft.entries().section('news').pinned('0').all() %}

{% set pinnedNews = craft.entries().section('news').pinned('true').all() %}
{% set unpinnedNews = craft.entries().section('news').pinned('false').all() %}

{% set pinnedNews = craft.entries().section('news').pinned('1').all() %}
{% set unpinnedNews = craft.entries().section('news').pinned('not 1').all() %}

{% set pinnedNews = craft.entries().section('news').search('pinned:1').all() %} THIS WORKS
{% set unpinnedNews = craft.entries().section('news').search('pinned:0').all() %} DOES NOT WORK
{% set unpinnedNews = craft.entries().section('news').search('pinned:not 1').all() %} DOES NOT WORK


Is there a proper to get the boolean values in Craft 3?
true/false are booleans, not strings, so you shouldn't surround them in quotes:

{% set pinnedNews = craft.entries().section('news').pinned(true).all() %}
{% set unpinnedNews = craft.entries().section('news').pinned(false).all() %}