Getting a value from a single property of a single object in an array in Node.js?
<p>I'm working with Node.js and MongoDB, I used this line:<code>db.collection('users').insertOne({"name":"john", "password":"connor"})</code> to insert a new document, and now I'd like to get the password from it.</p>

<p>I tried with: <code>var users_array = db.collection('users').find({name:"john"},{password:true, _id:false}).toArray()</code> and I get an array that looks like this: <code>[{"password":"connor"}]</code></p>

<p>Any way to get that value and save it in a string or something similar?</p>