I add object with categories in a DB. It shows the price and date of addition. How can I print the date to the console? Now, I have in the console: [ [ { cost: '50$', date: [Object] } ] ]. And I need to take what is in date. How can i do this?
// my obj
сategories: {
    products: {
      cost: "50$",
      date: {
        day: `11`,
        month: `11`,
        year: `11`,
      },
    },
  },
  // get date
  mongoClient.connect(function(err, client) {
    const db = client.db("expensesdb");
    const collection = db.collection("users");
    if (err) return console.log(err);
    collection.find({
      name: "Tom"
    }).toArray(function(err, results) {
      let res = results.map((user) => user.сategories.map((cat) => cat.products));
      console.log(res);
      client.close();
    });
  }); 
     
    