json - How to store a number array in MongoDB -


i looking store array of individual lotto drawn numbers within mongodb document.

neither of below structures work. can point out correct way form json facilitate type of storage?

[{     "date":"2014-02-10t10:50:42.389z",     "numbers":{         [10,20,30,40,12,31,35]     } }]  [{ "date":"2014-02-10t10:50:42.389z",     "numbers":{         10,20,30,40,12,31,35     } }] 

i looking import document mongo document , build on after that.

db.x.insert({"date" : new isodate() ,"numbers":[1,2,3]}) should work.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -