0

enter code here我创建了一个 shoppingCart 应用程序,我必须使用 nodemailer 通过电子邮件将订单发送给客户 我无法解构这个对象

这个对象可以有很多类似的值

{"5e4083f2c3231acf1ded8b1f":
{"item":
{
  "_id":"5e4083f2c3231acf1ded8b1f",
  "imagePath":"https://ahn9mtnal7pbz2v5wyw2gqon.drv.tw/ait.jpeg",
  "title":"My img",
  "description":"lambi cjhori decstkjfnsjknf fhfhf time nhi hai",
  "price":100},
  "qty":1,"price":100,"singlePrice":100}}

我努力了

let iofi = JSON.stringify(cart.items);

console.log("  iofi = stringify cart.items : "+ iofi );

let cartItemsvalues = Object.values(cart.items);

console.log("CV",cartItemsvalues);

并且仅${iofi}适用于nodemailerHtml:输出

4

0 回答 0