下面这两种在mongodb中插入数据都会报错
第一种:db.orders.insertOne({ "street": "493 Milll Curve", "city": "Chongqing", "state": "Texas", "country": "Malaysia", "zip": "24344-1715", "phone": "19734347645", "name": "Ellia", "userId": 3573, "orderDate": new Date(), "status": "created", "shippingFee": mongodb.Decimal128.fromString("8.00"), "orderLines": [{ "product1": "Refined Fresh Tuna", "sku": "2097", "qty": 24, "price": mongodb.Decimal128.fromString("56.00"), "cost": mongodb.Decimal128.fromString("46.45")}, { "product2": "Refined Fresh Tuna", "sku": "2000", "qty": 32, "price": mongodb.Decimal128.fromString("56.00"), "cost": mongodb.Decimal128.fromString("87")}]})
第二种:
`db.orders.insertOne({ "street": "493 Milll Curve", "city": "Chongqing", "state": "Texas", "country": "Malaysia", "zip": "24344-1715", "phone": "19734347645", "name": "Ellia", "userId": 3573, "orderDate": new Date(), "status": "created", "shippingFee": NumberDecimal("8.00"), "orderLines": [{ "product1": "Refined Fresh Tuna", "sku": "2097", "qty": 24, "price": NumberDecimal("56.00"), "cost": NumberDecimal("46.45")}, { "product2": "Refined Fresh Tuna", "sku": "2000", "qty": 32, "price": NumberDecimal("56.00"), "cost": NumberDecimal("87")}]})
`
最终想要的效果是这样的