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 7445957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:10:55+00:00 2026-05-29T12:10:55+00:00

I have a basic structure like this: > db.users.findOne() { _id : ObjectId(4f384903cd087c6f720066d7), current_sign_in_at

  • 0

I have a basic structure like this:

> db.users.findOne()
{
    "_id" : ObjectId("4f384903cd087c6f720066d7"),
    "current_sign_in_at" : ISODate("2012-02-12T23:19:31Z"),
    "current_sign_in_ip" : "127.0.0.1",
    "email" : "something@gmail.com",
    "encrypted_password" : "$2a$10$fu9B3M/.Gmi8qe7pXtVCPu94mBVC.gn5DzmQXH.g5snHT4AJSZYCu",
    "last_sign_in_at" : ISODate("2012-02-12T23:19:31Z"),
    "last_sign_in_ip" : "127.0.0.1",
    "name" : "Trip Jameson",
    "sign_in_count" : 100,
    "usertimes" : [
        ...thousands and thousands of records like this one....
        {
            "enddate" : 348268392.115282,
            "idle" : 0,
            "startdate" : 348268382.116728,
            "title" : "My Awesome Title"
        },
    ]
}

So I want to find only usertimes for a single user where the title was “My Awesome Title”, and then I want to see what the value for “idle” was in that record(s)

So far all I can figure out is that I can find the entire user record with a search like:

> db.users.find({'usertimes.title':"My Awesome Title"})

This just returns the entire User record though, which is useless for my purposes. Am I misunderstanding 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-05-29T12:10:56+00:00Added an answer on May 29, 2026 at 12:10 pm

    Return only partial embedded documents is currently not supported by MongoDB
    The matching User record will always be returned (at least with the current MongoDB version).

    see this question for similar reference

    Filtering embedded documents in MongoDB

    This is the correspondent Jira on MongoDB space

    http://jira.mongodb.org/browse/SERVER-142

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

Sidebar

Related Questions

So I have a structure like this: Widget: Component 1: Component 2: Component 3:
I have table structure like below: events (boxing, sparring etc) competitors (users who are
Some open source libraries have tendency to re implement basic structures like string, list,
I have the current basic structure for each domain object that I need to
Assuming I have the following Javascript structure: [ { hash: fe5642d26d04cc7e7d47daa426da2a79e244bdcbae1594a12578f0d6fe03082e, path: /Users/justin/test/node-w.tar.gz },
currently i have jdbc code with the following basic stucture: get Connection (do the
I have basic idea on Kilo Virtual Machine on Mobiles , I have clear
Currently, i have basic C++ and PHP skills. But, i want to switch to
I have a basic form with controls that are databound to an object implementing
I have a basic understanding of mock and fake objects, but I'm not sure

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.