# Error: Parse error: bad $in value

**URL:** <https://community.parseplatform.org/t/error-parse-error-bad-in-value/562>\
**Category:** Parse Server 📡\
**Created:** [July 20, 2020, 3:43pm UTC](https://community.parseplatform.org/t/error-parse-error-bad-in-value/562 "2020-07-20T15:43:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uzaysan](https://community.parseplatform.org/user_avatar/community.parseplatform.org/uzaysan/32/59_2.png) [@uzaysan](https://community.parseplatform.org/u/uzaysan)\
**Post date:** [July 20, 2020, 3:43pm UTC](https://community.parseplatform.org/t/error-parse-error-bad-in-value/562/1 "2020-07-20T15:43:28Z")

</div>

This is the error I get. I haven’t changed my code. It suddenly stopped working. Any idea How to solve this?

this is the full error:

`error: Parse error: bad $in value {"code":107,"stack":"Error: bad $in value\n at transformConstraint (/root/parse/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoTransform.js:1018:19)\n at transformQueryKeyValue (/root/parse/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoTransform.js:417:33)\n at transformWhere (/root/parse/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoTransform.js:469:17)\n at MongoStorageAdapter.find (/root/parse/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:497:59)\n at /root/parse/node_modules/parse-server/lib/Controllers/DatabaseController.js:1162:33\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)"}`

---

<div class="post-metadata">

**Author:** ![uzaysan](https://community.parseplatform.org/user_avatar/community.parseplatform.org/uzaysan/32/59_2.png) [@uzaysan](https://community.parseplatform.org/u/uzaysan)\
**Post date:** [July 20, 2020, 4:16pm UTC](https://community.parseplatform.org/t/error-parse-error-bad-in-value/562/2 "2020-07-20T16:16:55Z")

</div>

I think I figured out.  
By looking at [official mongodb docs](https://docs.mongodb.com/manual/reference/operator/query/in/)  
$in operator is equalivent of containedIn parameter of parse server.

I was passing an object to this parameter instead of array. When I changed it to equalTo, problem solved.

But this is strange. Same code was working almost 3 months. Suddenly İts stopped. Anyway problem solved.

---

<div class="post-metadata">

**Author:** ![LMBernardo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/lmbernardo/32/731_2.png) [@LMBernardo](https://community.parseplatform.org/u/LMBernardo)\
**Post date:** [July 23, 2021, 6:09pm UTC](https://community.parseplatform.org/t/error-parse-error-bad-in-value/562/3 "2021-07-23T18:09:19Z")

</div>

Thanks, I had the same issue and this fixed it. Passing a string to “containedIn” was working since I started this project, but doesn’t work anymore. Passing an array with a single string in it does.

---

<div class="post-metadata">

**Author:** ![richardgroves](https://community.parseplatform.org/user_avatar/community.parseplatform.org/richardgroves/32/1479_2.png) [@richardgroves](https://community.parseplatform.org/u/richardgroves)\
**Post date:** [February 20, 2023, 4:09pm UTC](https://community.parseplatform.org/t/error-parse-error-bad-in-value/562/4 "2023-02-20T16:09:11Z")

</div>

I’ve reported this as a documentation issue - [Parse.Query.containedIn documentation issue · Issue #1783 · parse-community/Parse-SDK-JS · GitHub](https://github.com/parse-community/Parse-SDK-JS/issues/1783)
