I’m not sure what those examples you provided are for…
I thought, you wanted to filter something?
One of my examples show you how to work with the filter.
I have items I need to filter only when their checkbox is selected
The other examples shows how to work with checkboxes.
You have to combine the both methods to get your aim.
You can also take a look into the CORVID-API, if my examples do not help you.
https://www.wix.com/corvid/reference/api-overview/introduction