Hassan Ahamed Hassan Ahamed - 1 month ago 9
Node.js Question

How to conver SELECT * FROM users WHERE name IN ('Peter', 'John') and age=30 in rethinkDB?

SELECT * FROM users
WHERE name IN ('Peter', 'John') and age=30;


I am new in
rethinkDB
.I want to convert this query in
RethinkDB
using
NodeJS
.

Can someone please help me?

Answer
r.db("mydb").table("users").filter(doc => doc("name").eq('Peter')
    .or(doc("name").eq('John')).and(doc('age').eq(30)));
Comments