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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:47:07+00:00 2026-05-28T02:47:07+00:00

Example first: { _id : ObjectId(4f086809bf28fd7bb56e6059), admins : [ 4ef8e785b2694c3649000001 ], pages : [

  • 0

Example first:

{ "_id" : ObjectId("4f086809bf28fd7bb56e6059"), "admins" : [ "4ef8e785b2694c3649000001" ], "pages" : [
    {
        "pagename" : "home",
        "title" : "homepage",
        "default" : true
    },
    {
        "pagename" : "people",
        "title" : "Staff",
        "default" : false
    }
], "sitename" : "Site", "sitenameLower" : "site" }

So that’s the document I’m querying, now what I want is to return the ‘page’ where pagename = ‘home’.

I’ve tried various queries but it always returns the whole document and not the individual object inside the pages array – which is not much use to me.

Including:

db.sites.find({'pages.pagename' : 'home'});

I can see, why this is wrong, but getting it right, is perplexing me.

  • 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-28T02:47:08+00:00Added an answer on May 28, 2026 at 2:47 am

    See this question. Looks like it’s a planned feature but you can’t do it right now.

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

Sidebar

Related Questions

Consider the following example of mongo collection: {_id : ObjectId(4f304818884672067f000001), hash : {call_id :
I'm following the example in the docs : > t.find() { _id : ObjectId(4b97e62bf1d8c7152c9ccb74),
I hope my title isn't too confusing. An example first. I have the following
Given the following example data: Users +--------------------------------------------------+ | ID | First Name | Last
I am following this example (First comment), How to create a custom ListView with
Using the Programming F# book, there's an example first given as serial: let result1
When attempting to run the first example in the boost::mpi tutorial , I was
Assume methods M1 and M2 have strongly related responsibilities First example: If • M1
If I have three files index.php file.php and fns.php First example (it works): index.php
I have a simple marker annotation for methods (similar to the first example in

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.