I have schema like this
{
"quantity": 0,
"_id": "6156ec720c5074fbd3739074",
"title": "Adidas nite jogger",
"description": "description adidas.Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestias facere deserunt, quaerat distinctio officiis eligendi culpa sequi molestiae voluptatem velit, ab facilis quae sint vel obcaecati, incidunt ducimus odio",
"price": 75,
"__v": 0
}
The quantity field is shown when the request sent in postman, but when I look in my database I see sth like this MongoDB table
So there isn't such a field so I want to remove it in Postman too.
I tried to use $unset, but it doesn't work/
Sorry for my English:)
This attribute is added by mongoose not by mongodb server, to remove it you should just modify your schema declaration:
const yourSchema = new Schema({...}, { versionKey: false });