【发布时间】:2017-03-21 23:02:32
【问题描述】:
基本上想在数组数组中推送数据,即 publicHolidays 是外部数组,holidayList 是内部数组。这是现在看起来的 mongodb 架构。
"publicHolidays" : [
{
"location" :"pune"
"year" : 2016
"holidayList"[
{
"holidayDate" :"2016-11-09",
"holidayName":"Diwali"
}
]
}
]
I am expecting below schema,wanted to push data in holidayList.
"publicHolidays" : [
{
"location" :"pune"
"year" : 2016
"holidayList"[
{
"holidayDate" :"2016-11-09",
"holidayName":"Diwali"
}
{
"holidayDate" :"2016-1-09",
"holidayName":"padwa"
}
{
"holidayDate" :"2016-12-10",
"holidayName":"holi"
}
]
}
]
【问题讨论】:
-
你的代码在哪里..?
-
你在哪里期待这个?在数据库还是什么?
标签: arrays mongodb meteor mongodb-query