The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

BobCochran (92) [Avatar] Offline
I'm a little sad at the lack of Node.js coverage in Chapter 3. Ruby is great, but lacks the universality of JavaScript. I think I can muddle through the chapter by reading the official Mongo documentation for the Node 'mongodb' driver. I'm starting to get some results from both the 'users' and the 'numbers' collections which I created as I followed along in Chapter 2:

$ node test_mongo.js
count = 2
[ { _id: 52db13ceec9f5f9f62557111,
country: 'Canada',
favorites: { cities: [Object], movies: [Object] },
username: 'Smith' },
{ _id: 52db1483ec9f5f9f62557112,
country: 'USA',
favorites: { movies: [Object] },
username: 'Jones' } ]
$ node test_mongo_tutorial_numbers.js
count = 200000
$ node test_mongo_tutorial_numbers.js
count = 200000
[ { _id: 52dbd97debac31cddd97ea60, num: 199996 },
{ _id: 52dbd97debac31cddd97ea61, num: 199997 },
{ _id: 52dbd97debac31cddd97ea62, num: 199998 },
{ _id: 52dbd97debac31cddd97ea63, num: 199999 } ]

I have to learn how to extract the data from these arrays. I'm new to JavaScript. With that said, the book plus researching other resources is working for me.