Query does not work with currentUserId

I have a dynamic page with a button on it (Members (ID)).
When I push the button I would like to redirect logged in member based on its parameter (category) stored in a column in the same Collection (Members).

import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;

$w.onReady( () => {
} );

export function button2_click() {
wixData.query(“Members”)
.contains(“ID”, wixUsers.currentUser.id)
.contains(“category”, “category1”)
.count()
.then( (num) => {
if (num === 1) {
wixLocation.to(“/pageA”); }
else {
wixLocation.to(“/pageB”);
}

}); 

}

It always get the num=0, so I do not have any matching record.
I am testing the code for 2 days, checked every field name, record is in the collection, publish the page, logged in in the published web but always get pageB which say no result.
Instead of .contains, tried .eg, .hasAll, .hasSome but no results.
Sandbox=Live.
I put onReady for timing so I do not know the reason why this code do not see that 1 matching record.

Thanks in advance!

Hi,

Can you please share URL to your site or Editor?

Liran.

Thank you Liran,
I have alread solved it: I have to change “ID” field name to “_id” and it works!