[16:24:59] <zirpubolci> why do you need an autoincrement field?
[21:27:19] <jstout24> what's the best way to reorder a referenced collection
[21:27:50] <jstout24> ie) path has a many references to `pages`… there's a field in `pages` called `position` and whenever the position changes, i want to resort all the references so it always goes in order
[21:28:34] <jstout24> do i { $unset: { pages: true } } then $pushAll?
[21:39:35] <dgottlieb> jstout24: I think a { $set: {pages: <pages_array>} } accomplishes the same as $unset and $pushAll, but in one step
[21:40:10] <BadDesign> Is there a way to convert JSON object to DBOject in MongoDB?
[21:40:13] <jstout24> oh true… yeah my odm was automatically doing the unset, but i'll see if i can force the update differently
[22:48:23] <skot> you can do this: db.coll.find({$where:function() { if (this.a == 2) {return true;}}})
[22:50:27] <dstorrs> and then if I want to actually run a JS function across the '.a' value (e.g. 'length()'), how would I do that? ...return trye;}}}).forEach( print ) ?