Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:49:41+00:00 2026-06-10T08:49:41+00:00

I am hitting up mongo (via mongoose customer.find() ) and getting back something that

  • 0

I am hitting up mongo (via mongoose customer.find()) and getting back something that looks like

[{ _id: 5029a09e099fb5095fdb2d73,
  clientId: 22,
  company: 'X',
  email: 'X@Y.ca',
  firstName: 'X',
  lastName: 'Y',
  quality: 'Sold',
  address: 
   { phone: '',
     alt: '',
     street1: '',
     street2: '',
     city: '',
     state: 'Ontario',
     country: 'Canada',
     code: '' },
  comments: []
}]

Please note that this is the result from console.log directly. This is not something I am entering, this is the results from mongoDB. _id is being returned in this form by mongo and has absolutely nothing to do with the issue.

when I try

console.log(customer[0]) I get

{ _id: 5029a09e099fb5095fdb2d73,
      clientId: 22,
      company: 'X',
      email: 'X@Y.ca',
      firstName: 'X',
      lastName: 'Y',
      quality: 'Sold',
      address: 
       { phone: '',
         alt: '',
         street1: '',
         street2: '',
         city: '',
         state: 'Ontario',
         country: 'Canada',
         code: '' },
      comments: []
    }

as expected

when I try console.log(customer[0].quality) I get undefined

when I try console.log(customer[0].email) or any of the others it works fine, and I get the expected value.

to my knowledge, quality isn’t a reserved word, am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:49:42+00:00Added an answer on June 10, 2026 at 8:49 am

    Mongoose find returns Query object. It not just plain javascript object. It inherits methods of your model, query methods, methods of Document. console.log shows you just toString method result of this object. It may be modified by getters or virtuals. _id without quotes also toString result of ObjectId class. Try access your value by customer[0].get(‘quality’); Or convert it to plain object via customer[0].toObject();

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hitting a problem in JSON I'm getting back from a Bugzilla server because
I am hitting an xml and getting the response back in inputstream. This xml
We all know that hitting the back button on the device doesn't kill the
I'm constantly hitting an OutOfMemoryException inside a method that creates and processes some byte
I currently have a web site hitting 7 Access DBs that I desperately need
I have a Sinatra DataMapper app hitting a sqlite3 database that I am attempting
I am hitting an issue with my Hibernate backed Jpa queries returning data that
I'm hitting a wall with this error. I'm sure I'm overlooking something basic, just
Does hitting the back button in a web browser cause the session data set
I'm finding that hitting the Refresh button on my browser will temporarily screw up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.