Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda