bsonify
A utility intended to be used in conjunction with MongoDB. Recursively loops through JSON objects and replaces mongo style ids (24 character hex strings) with corresponding ObjectIDs. This allows for simple conversions of _id fields as well as conversions throughout an arbitrarily deep structure.
Install
$ npm install bsonify
Usage
var bsonify = ; var id = bsonify; id instanceof ObjectID // true var result = bsonify; resultrelated_ids1 instanceof ObjectID // trueresultcomments0user_id instanceof ObjectID // true
Test
npm test