You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like this I have 81 Objects. I am trying to pass this Array from EJS file hidden field to mongoose schema, but when I am trying to save this array it is getting saved as String in MongoDB, something like this
"[object Object],[object Object],[object Object],[object Object]............"
So I cannot evaluate this while I want to retrieve this data. Mongoose Schema is as below
var tbl_GameData = new mongoose.Schema({
//id: {type: Number},
LevelID : {type: Number},
Data : {type: Array}
});
Hi,
I have an Array of Objects with size of 81. It is as below
Array.length = 81
[1] Object {val: 1, candidates: Array[9]}
Like this I have 81 Objects. I am trying to pass this Array from EJS file hidden field to mongoose schema, but when I am trying to save this array it is getting saved as String in MongoDB, something like this
"[object Object],[object Object],[object Object],[object Object]............"
So I cannot evaluate this while I want to retrieve this data. Mongoose Schema is as below
and saving from ejs file is like as below
I dont know how to save this in DB so that I can retrieve it back as an array. Can you please help!
The text was updated successfully, but these errors were encountered: