loopback
loopback copied to clipboard
passing number filter in url API loopback?
How do I filter the url to get the data to the customer phone number instead of its id. I sent the url is http://strongloop.myweb:3000/customers?filter[where][phone]=+6486775353 but why nothing comes up with that parameter? whereas the data in the db is appropriate
I’m able to reproduce the problem with LoopBack with mongodb connector. It’s due to the fact that we coerce numbers from the query string. The mongodb connector doesn’t match phone=1000 to phone=‘1000’.
The issue has been fixed by https://github.com/strongloop/loopback-datasource-juggler/pull/47