node.js - Strongloop querying data with (or) and (and) at the same time -
i need this.
select * person (firstname '%a' or lastname "%a") , id not in (1 , 2) node.js:
begroupduser.find({ limit: limit, skip: skip, where: { id: { nin: adminids }, or: [{ firstname: {like: '%' + _query + '%'} }, { lastname: {like: '%' + _query + '%'} }] } }, function (errors, users) { });
try this
{ "where": { "and": [ { "id": { "nin": adminids } }, { "or": [{ firstname: {like: '%' + _query + '%'}}, { lastname: {like: '%' + _query + '%'}} ] } ] } }
Comments
Post a Comment