首页 > 解决方案 > 定义集合时的 ​​MongoDB 产品集合和语法错误

问题描述

我正在尝试学习 MongoDB 并尝试进行收集:

{
  "type": "Audio Album",
  "title": "A Love Supreme",
  "description": "by John Coltrane",
  "shipping": {
    "weight": 6,
    "dimensions": [{
      "width": 10,
      "height": 10,
      "depth": 1
    }]
  },
  "pricing": [{
    "list": 1200,
    "retail": 1100,
    "savings": 100,
    "pct_savings": 8
  }],
  "details": {
    "title": "A Love Supreme [Original Recording Reissued]",
    "artist": "John Coltrane",
    "genre": "Jazz",
    "tracks": ["", "", "", ""]
  }
}

但是,https://mongoplayground.net/p/AndUCdMxqLq显示我有一个语法错误,我很难找到它。有没有人可以提供帮助?谢谢

标签: mongodb

解决方案


推荐阅读