// 云函数入口函数
exports.main = async (event, context) => {
var arr = event.sportItem;
cloud.database().collection("stu")
.add({ //添加数据
data:{
_id:event.id,
password:event.password,
// arr.forEach(function(item, index){
// item:false,
// }),
}
})
}小程序向云数据库添加记录时,想添加一个不定长数组内容作为属性列,怎么在data中写明这个不定长数组?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
阿呆呆1 2021-04-16 14:33关注data:{ _id:event.id, password:event.password, array:[] }本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报