Mongolite and R
<p>I have the code below, why it is not working? Thanks.</p>

<pre><code>library(mongolite)
library(jsonlite)

id &lt;- c('35325073','35325078')

id_list_JSON &lt;- toJSON(id)

test3 &lt;- m1$find('{"_id": {"$in": id_list_JSON}}', fields = '{"_id" : 1, "f.fid" : 1, "ud" : 1}')
</code></pre>

<blockquote>
  <p>Error: Invalid JSON object: {"_id": {"$in": id_list_JSON}}</p>
</blockquote>