# Last notEqualTo modifier overriedes the previous one

**URL:** <https://community.parseplatform.org/t/last-notequalto-modifier-overriedes-the-previous-one/3226>\
**Category:** JavaScript SDK\
**Created:** [January 30, 2023, 4:36pm UTC](https://community.parseplatform.org/t/last-notequalto-modifier-overriedes-the-previous-one/3226 "2023-01-30T16:36:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreisu](https://community.parseplatform.org/user_avatar/community.parseplatform.org/andreisu/32/1414_2.png) [@andreisu](https://community.parseplatform.org/u/andreisu)\
**Post date:** [January 30, 2023, 4:36pm UTC](https://community.parseplatform.org/t/last-notequalto-modifier-overriedes-the-previous-one/3226/1 "2023-01-30T16:36:25Z")

</div>

In the code below only the last notEqualTo modifier takes effect. I.e. it overrides the one that came before it. Is it possible to apply 2 notEqualTo modifiers for the same field?

```auto
const query = new Parse.Query("Comments");
query.notEqualTo("status", "angry");
query.notEqualTo("status", "happy");

query.equalTo("abc", "cde");
... other parameters

const result = await query.first({ useMasterKey: true })

```

I tried this method but it didn’t work either:

```auto
const notAngry = new Parse.Query("Comments");
notAngry.notEqualTo("status", "angry");

const notHappy = new Parse.Query("Comments");
notHappy.notEqualTo("status", "happy");

const mainQuery = Parse.Query.or(notAngry, notHappy);
mainQuery.equalTo("abc", "cde");
other params...
const result = await mainQuery.first({useMasterKey: true});

```

---

<div class="post-metadata">

**Author:** ![sdfjtr34](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@sdfjtr34](https://community.parseplatform.org/u/sdfjtr34)\
**Post date:** [February 9, 2023, 8:34am UTC](https://community.parseplatform.org/t/last-notequalto-modifier-overriedes-the-previous-one/3226/2 "2023-02-09T08:34:55Z")

</div>

You can use `query.notContainedIn("status", ["angry", "happy"]);`
