Hi

I have a function that save a document in a mongodb database:

function *savedata*(name, data, next){

var ResultsModel=mongoose.model('Result',
{ name:String,
  create_at:{type:Date,default:Date.now},
  *data:[]*
});

var r=new ResultsModel();
r.name = name;
*r.data = data;*
r.save(function(err){
if(err) throw err;
next();
});
}


If i call a function with    savedata('reportname', *['field1': 100,
'field2': 200]*, function(err){ console.log('done') })

When i want retreive the data, the array is like this: *['field2': 200,
'field1': 100]* . Perfectly reversed.

Any idea?




[email protected]

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to