Filter multiple conditions

I have the structure: let result = response.data.filter(item => item.CapThucHien == 2 || item.CapThucHien == 3)
but failed to execute the command “or”
Hope everybody help please
Thanks

First, please format code with backticks above and below e.g.

```
code = 'here'
```

2ndly have you tried another format e.g.

let result = response.data.filter(item => {
return (item.CapThucHien == 2 || item.CapThucHien == 3)
});

Or even old school…

let result = response.data.filter(function (item){
  return (item.CapThucHien == 2 || item.CapThucHien == 3)
});

Or older school…

let filtered=[];
for(let i=0; i<response.data.length;i++){
  const item = response.data[i];
  if(item.CapThucHien == 2 || item.CapThucHien == 3){
    filtered.push(item)
  }
}

Note also, nowhere do you check that resposnse or response.data are even valid objects - I’d recommend you at wrap this with an if test at minimum e.g…

if(response && response.data){
  //Do filtering here now we know response and response.data are something!
}