Sunday 19 March 2017

Create MongoDB Arrays

I'm new to Mongodb.

I have a form textarea with three types of properties.

 "Jobs[]" value ="1"
 "Jobs[]" value ="2"
 "Jobs[]" value ="3"

But my Schema looks like this:

 name: String,
 location: String,
 Jobs: String

How can I insert those multiple jobs from my html to my Schema without creating Jobs1, Jobs2 and Jobs3?

Thank you

If it helps, I'm using express, nodejs and mongoose.



via jomeco1

No comments:

Post a Comment