Closed DeanKamali closed 6 years ago
Hello everyone,
I'm trying to save an Array, and here is an example
"procedures": [ "AK", "HI" ],
In Schema file, here is what I specified
procedures: { type: Array },
it gets saved as an empty array? and none of the elements makes it to DB, why is that?
hmm, after struggle, I found out that I need to do the following:
procedures: SimpleSchema.oneOf(String, Array), 'procedures.$': { type: String, optional: true, },
Hello everyone,
I'm trying to save an Array, and here is an example
In Schema file, here is what I specified
it gets saved as an empty array? and none of the elements makes it to DB, why is that?