These are chat archives for Automattic/mongoose

Jul 2016
James Bond
Jul 26 2016 01:31
I am connecting to mLab sandbox server and I need help connecting to a database via javascript, Can anyone help me?
Alex Shpak
Jul 26 2016 01:38
@Dman89 what errors do you have?
Jul 26 2016 09:54
Hi , i'm trying to make voting app challenge and store the voting data in mongodb , this data is like key/value such as { "candidate1" : 1 , "candidate2" : 2 } , I was using Object data type in mongoose schema then I just found out there is not Object schema data type from this link: , I'm confusing how can I store key/value data in mongodb ? Or I just create two arrays , pair them by index ? Thanks
Yogesh Patel
Jul 26 2016 10:39
@JaosnHsieh use mixed data type

Hi all
I have schema with keys xyz and abc.
My question is that if my request has parameter number =1 then add both value in database if number =2 then not include xyz and abc and dont store values.
because when request has number =2 then in db store xyz=[] and 'abc=[]'.


Ousmane Seidy Diallo
Jul 26 2016 10:59
Hello everybody