Experimenting with node.js / express / mongodb.
I\'m using
http://localhost:3000/models/save?model={\"name\":\"blah blah blah\"}
to pass a test JSON obj
Please try the following:
var model = JSON.parse(req.query.model);
instead of the line
var model = req.query.model;
JSON.parse
method parses JSON string representation (which in your case is model
request query parameter) and returns Javascript object which you can then use in your insert process.
I hope it helps some way.