WixDataQuery eq() filter bug

I’m getting some weird functionality when I call use the equal (.eq) query to find documents in my database. Inside of my http-functions.js file I’m trying to design an API to GET documents from my “Weight” database that have a “athlete” property equal to the first prefix of the URL path (i.e. “60c02047-9bac-461a-a078-a3505e06b1a5”). You can see the complete URL in my code below. When I assign the path[1] to a variable and try to use that variable in my find() query, I get the entire contents of my database. So the eq() filter essentially doesn’t filter.


Output in browser:

The weird thing is that if I change my eq() filter to a predefined string, I get the correct results.


For some reason it doesn’t like the variable that I pass in via the URL path.

Any help would be greatly appreciated! And btw WIX is awesome!!

  • Rob :slight_smile:

Actually, the first item in path would be:

and not:

Not sure if that’s your problem, but it might be a good start.

I hope that helps,