0

How to find a particular object in a array.

Below is my code

r.table("tablename").filter(
  function(doc){
      return r.expr(["value1","value2"]);
});
Govind Jha
  • 123
  • 2
  • 9

1 Answers1

1

You have forgotten to add .contains in return statement. Try the rectified one -

r.table("tablename").filter(
  function(doc){
    return r.expr(["value1","value2"]).contains(doc("someKey"));
 });
iamvik
  • 51
  • 8