How to delete a field in MongoDB

ask, there is only one piece of data in the users table. If I want to delete the indexes 8-11 in the middle cartList entry (array), how can I delete these field?
I"m not very good at learning mongoDB. By the way, what are the better mongoDB quick check materials ~ Thank you

Apr.07,2021

db.users.update(
   { _id: ObjectId('58c41d5d3eddd93e9ab5b078') },
   {
    $push: {
      cartList: {
         $each: [ ],
         $slice: 8
      }
    }
  }
)

buy a mongo book. Then cooperate with the information on the official website of mongo . Then in the actual use, constantly ask yourself some problems, and then find a solution.

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b20b-4eed2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b20b-4eed2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?