These are chat archives for Automattic/mongoose

26th
Jul 2016
James Bond
@Dman89
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
@ishikawayoshi
Jul 26 2016 01:38
@Dman89 what errors do you have?
JaosnHsieh
@JaosnHsieh
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: http://mongoosejs.com/docs/api.html , 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
@ycpatel813
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=[]'.

Thanks

Ousmane Seidy Diallo
@TheBlackDude
Jul 26 2016 10:59
Hello everybody