creationix / nstore

nStore is a simple, in-process key/value database for node.js
MIT License
392 stars 31 forks source link

"results is an object keyed by document key with the document as the value" #28

Closed profesoralex closed 13 years ago

profesoralex commented 13 years ago

Hi! First of all, thank you for your project I think will be util! Look, My simple question is: What is the format to get the value as result of the find command? That's, What do I need to write in "sys.puts(result....)" command to get the age for example? Thank you in advance!

users.find({name: "profesoralex"}, function(err, results) { // results is an object keyed by document key with the document as the value sys.puts(results["creationix"].key.name); });

profesoralex commented 13 years ago

Ok, I just get it: sys.puts(results.creationix.age); Thank you!!!!!