Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
MongoDB doesn't contain field, but when request is sent this field is shown

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:)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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 });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!