-2
   {
      or: [
        { and: [{ cash: 'NEW' }] },
        {editGoalStatus: 'PROCESSING'},
        {editGoalStatus: 'NEW'},
          a]
    }

I want record like editGoalStatus should be PROCESSING or NEW and cash must be NEW

il_raffa
  • 5,090
  • 129
  • 31
  • 36
Akshay
  • 1
  • 4
  • Give more details about your code; what are you trying to achieve ? What are you using to create the query ? – Madhur Bhaiya Sep 05 '18 at 06:12
  • I'm trying to achieve fetch record from table where editGoalStatus is PROCESSING or NEW and cash column value must NEW only those record I want but right now it selects all record – Akshay Sep 05 '18 at 06:18

2 Answers2

0

Taking a look at the documentation the filter should be something like

{
    and: [
        { cash: 'NEW' },
        {editGoalStatus: 'PROCESSING'},
        {editGoalStatus: 'NEW'}
    ]
}

So assuming that you wrote the

Óscar Andreu
  • 1,630
  • 13
  • 32
0

I want record like editGoalStatus should be PROCESSING or NEW and cash must be NEW

{
    and: [
        { cash: 'NEW' },
        { editGoalStatus: { inq: ['PROCESSING', 'NEW'] } }
    ]
}

Hope this might be a hint.

Cheers!

SuperStar518
  • 2,814
  • 2
  • 20
  • 35