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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:32:34+00:00 2026-05-25T02:32:34+00:00

I have the following db entry: { _id: ObjectId(4d2339f9772c4bae5403dd47), uname: Eamorr, posts: { 0:

  • 0

I have the following db entry:

{
   "_id": ObjectId("4d2339f9772c4bae5403dd47"),
   "uname": "Eamorr",
   "posts": {
     "0": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1294154233,
       "UTC": "2011-01-04T15: 17: 13+00: 00",
       "ip": "134.226.1.229",
       "id": "974vi95ljn5aa22ykd21"
    },
     "1": {
       "comment": "wddddd",
       "fromUname": "Anonymous",
       "time": 1294154360,
       "UTC": "2011-01-04T15: 19: 20+00: 00",
       "ip": "134.226.1.229",
       "id": "519fy1sj6f8mc4ws8v1y"
    },
     "2": {
       "comment": "asdf2",
       "fromUname": "Anonymous",
       "time": 1294162680,
       "UTC": "2011-01-04T17: 38: 00+00: 00",
       "ip": "86.40.63.120",
       "id": "ho27be183q3kqxi2w618"
    },
     "3": {
       "comment": "asdf3",
       "fromUname": "Anonymous",
       "time": 1294162759,
       "UTC": "2011-01-04T17: 39: 19+00: 00",
       "ip": "86.44.19.49",
       "id": "bib1184hb8e90f67zhac"
    },
     "4": {
       "comment": "Eamonn",
       "fromUname": "Anonymous",
       "time": 1294162884,
       "UTC": "2011-01-04T17: 41: 24+00: 00",
       "ip": "86.44.19.49",
       "id": "rbq18o0r73mdfc8a023n"
    },
     "5": {
       "comment": "Eamonn2",
       "fromUname": "Anonymous",
       "time": 1294162967,
       "UTC": "2011-01-04T17: 42: 47+00: 00",
       "ip": "86.44.19.49",
       "id": "p1210t688d0g5c0t97jx"
    },
     "6": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1294235472,
       "UTC": "2011-01-05T13: 51: 12+00: 00",
       "ip": "134.226.1.229",
       "id": "y128u1m57bw1n711gr8o"
    },
     "7": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1294235557,
       "UTC": "2011-01-05T13: 52: 37+00: 00",
       "ip": "134.226.1.229",
       "id": "5g1xc51mm057p39c5l1p"
    },
     "8": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1294235617,
       "UTC": "2011-01-05T13: 53: 37+00: 00",
       "ip": "134.226.1.229",
       "id": "m35g1ug0220g82lq8z31"
    },
     "9": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1294240505,
       "UTC": "2011-01-05T15: 15: 05+00: 00",
       "ip": "134.226.1.229",
       "id": "i9ngh02d8ifg464088x2"
    },
     "10": {
       "comment": "boards.ie",
       "fromUname": "Anonymous",
       "time": 1294240542,
       "UTC": "2011-01-05T15: 15: 42+00: 00",
       "ip": "134.226.1.229",
       "id": "vcu1ks7ev1swaeu6z2r4"
    },
     "11": {
       "comment": "Hello",
       "fromUname": "Eamorr",
       "time": 1295618860,
       "UTC": "2011-01-21T14: 07: 40+00: 00",
       "ip": "134.226.252.160",
       "id": "00kk05gp258clzk15mxs"
    },
     "12": {
       "comment": "asdf",
       "fromUname": "Eamorr",
       "time": 1295624407,
       "UTC": "2011-01-21T15: 40: 07+00: 00",
       "ip": "212.129.64.223",
       "id": "6knwupaws7641a7fvsq2"
    },
     "13": {
       "comment": "asdf",
       "fromUname": "Eamorr",
       "time": 1295624465,
       "UTC": "2011-01-21T15: 41: 05+00: 00",
       "ip": "212.129.64.223",
       "id": "rl4k3i710xkwr5njq36l"
    },
     "14": {
       "comment": "Hi",
       "fromUname": "Eamorr",
       "time": 1295635332,
       "UTC": "2011-01-21T18: 42: 12+00: 00",
       "ip": "212.129.64.223",
       "id": "w2q11m6kaqdw9p8k44v4"
    },
     "15": {
       "comment": "Hello!!!",
       "fromUname": "Eamorr2",
       "time": 1296082365,
       "UTC": "2011-01-26T22: 52: 45+00: 00",
       "ip": "86.44.21.90",
       "id": "001cwy768eik620rka91"
    },
     "16": {
       "comment": "Hello",
       "fromUname": "Eamorr",
       "time": 1296280251,
       "UTC": "2011-01-29T05: 50: 51+00: 00",
       "ip": "86.44.20.113",
       "id": "0wfe8r9490lf5r1s11kv"
    },
     "17": {
       "comment": "Hello",
       "fromUname": "Eamorr",
       "time": 1298632583,
       "UTC": "2011-02-25T11: 16: 23+00: 00",
       "ip": "86.44.49.74",
       "id": "71k5cn8zrmsudy77513g"
    },
     "18": {
       "comment": "just wanted to say hi",
       "fromUname": "Anonymous",
       "time": 1299175499,
       "UTC": "2011-03-03T18: 04: 59+00: 00",
       "ip": "71.235.146.42",
       "id": "u2ejx9d812vk6147me6m"
    },
     "19": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299238987,
       "UTC": "2011-03-04T11: 43: 07+00: 00",
       "ip": "212.129.64.223",
       "id": "ibl84549kz220va052qm"
    },
     "20": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239150,
       "UTC": "2011-03-04T11: 45: 50+00: 00",
       "ip": "212.129.64.223",
       "id": "503hl41wmb73756h1oe0"
    },
     "21": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239230,
       "UTC": "2011-03-04T11: 47: 10+00: 00",
       "ip": "212.129.64.223",
       "id": "8894rpqow2i38b777cky"
    },
     "22": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239341,
       "UTC": "2011-03-04T11: 49: 01+00: 00",
       "ip": "212.129.64.223",
       "id": "37885igze3q81wcf8ko7"
    },
     "23": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239409,
       "UTC": "2011-03-04T11: 50: 09+00: 00",
       "ip": "212.129.64.223",
       "id": "3p2095098p96315u7632"
    },
     "24": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239561,
       "UTC": "2011-03-04T11: 52: 41+00: 00",
       "ip": "212.129.64.223",
       "id": "j8d79nwb65u4cl8808l8"
    },
     "25": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239727,
       "UTC": "2011-03-04T11: 55: 27+00: 00",
       "ip": "212.129.64.223",
       "id": "202ts1046jkuysd78509"
    },
     "26": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239793,
       "UTC": "2011-03-04T11: 56: 33+00: 00",
       "ip": "212.129.64.223",
       "id": "6ye47y3tr9syt20k5kgp"
    },
     "27": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299239830,
       "UTC": "2011-03-04T11: 57: 10+00: 00",
       "ip": "212.129.64.223",
       "id": "55g039yzp4013bk4aqtr"
    },
     "28": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299240076,
       "UTC": "2011-03-04T12: 01: 16+00: 00",
       "ip": "212.129.64.223",
       "id": "8w7sy170dku4y9o06d1g"
    },
     "29": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299240113,
       "UTC": "2011-03-04T12: 01: 53+00: 00",
       "ip": "212.129.64.223",
       "id": "1noki588r7796v5mti2f"
    },
     "30": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299240152,
       "UTC": "2011-03-04T12: 02: 32+00: 00",
       "ip": "212.129.64.223",
       "id": "l175d3aew064feaw9126"
    },
     "31": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299240245,
       "UTC": "2011-03-04T12: 04: 05+00: 00",
       "ip": "212.129.64.223",
       "id": "5rpz421351p7qrv5o7rk"
    },
     "32": {
       "comment": "Hello2",
       "fromUname": "Anonymous",
       "time": 1299240280,
       "UTC": "2011-03-04T12: 04: 40+00: 00",
       "ip": "212.129.64.223",
       "id": "n031287n17eo14v9tuda"
    },
     "33": {
       "comment": "Hello",
       "fromUname": "Anonymous",
       "time": 1299240365,
       "UTC": "2011-03-04T12: 06: 05+00: 00",
       "ip": "212.129.64.223",
       "id": "609773uq8rsv5vuw4s0k"
    },
     "34": {
       "comment": "Hello2",
       "fromUname": "Anonymous",
       "time": 1299240406,
       "UTC": "2011-03-04T12: 06: 46+00: 00",
       "ip": "212.129.64.223",
       "id": "57w4v64ekl76np304d9k"
    },
     "35": {
       "comment": "Hello3",
       "fromUname": "Anonymous",
       "time": 1299240441,
       "UTC": "2011-03-04T12: 07: 21+00: 00",
       "ip": "212.129.64.223",
       "id": "7v6agdd2xdgm2zyya5pb"
    },
     "36": {
       "comment": "Hello",
       "fromUname": "Eamorr",
       "time": 1299241138,
       "UTC": "2011-03-04T12: 18: 58+00: 00",
       "ip": "212.129.64.223",
       "id": "1qp2a2837x31791xxg0s"
    },
     "37": {
       "comment": "asdf",
       "fromUname": "Eamorr",
       "time": 1299241395,
       "UTC": "2011-03-04T12: 23: 15+00: 00",
       "ip": "212.129.64.223",
       "id": "x7app929kw9l4p1bk977"
    },
     "38": {
       "comment": "lkjh",
       "fromUname": "Anonymous",
       "time": 1299241477,
       "UTC": "2011-03-04T12: 24: 37+00: 00",
       "ip": "212.129.64.223",
       "id": "ea9ws389971pmt6waee8"
    },
     "39": {
       "comment": "Hello",
       "fromUname": "Eamorr",
       "time": 1299244791,
       "UTC": "2011-03-04T13: 19: 51+00: 00",
       "ip": "212.129.64.223",
       "id": "bfk9tm2gt6z254739z08"
    },
     "40": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1299249252,
       "UTC": "2011-03-04T14: 34: 12+00: 00",
       "ip": "212.129.64.223",
       "id": "ufaf48c1qd1e0n07s8m5"
    },
     "41": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1299250483,
       "UTC": "2011-03-04T14: 54: 43+00: 00",
       "ip": "212.129.64.223",
       "id": "3k65kne9h0pk410xzc0p"
    },
     "42": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1299251270,
       "UTC": "2011-03-04T15: 07: 50+00: 00",
       "ip": "212.129.64.223",
       "id": "t7740r0fcby6gowlw9xk"
    },
     "43": {
       "comment": "Hi, how's it going?",
       "fromUname": "Eamorr",
       "time": 1299683127,
       "UTC": "2011-03-09T15: 05: 27+00: 00",
       "ip": "212.129.64.223",
       "id": "9l864xc2agxsdjo4257y"
    },
     "44": {
       "comment": "3hvdn",
       "fromUname": "Anonymous",
       "time": 1299683730,
       "UTC": "2011-03-09T15: 15: 30+00: 00",
       "ip": "212.129.64.223",
       "id": "4frfsf12xwz1to9po0w3"
    },
     "45": {
       "comment": "Hi there",
       "fromUname": "Anonymous",
       "time": 1299684889,
       "UTC": "2011-03-09T15: 34: 49+00: 00",
       "ip": "212.129.64.223",
       "id": "hw4i9mk906n1qvg63o2d"
    },
     "46": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1313371240,
       "UTC": "2011-08-15T02: 20: 40+01: 00",
       "ip": "212.129.66.130",
       "id": "0f4o199394hzqyv6by89"
    },
     "47": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1313430246,
       "UTC": "2011-08-15T18: 44: 06+01: 00",
       "ip": "212.129.66.131",
       "id": "73xbuqwauhls17cb3dc3"
    },
     "48": {
       "comment": "vvvvvvvv",
       "fromUname": "Anonymous",
       "time": 1313430944,
       "UTC": "2011-08-15T18: 55: 44+01: 00",
       "ip": "212.129.66.131",
       "id": "44dw9427805j93g51u2h"
    },
     "49": {
       "comment": "vvvvvvvv",
       "fromUname": "Anonymous",
       "time": 1313431402,
       "UTC": "2011-08-15T19: 03: 22+01: 00",
       "ip": "212.129.66.131",
       "id": "lo1n5i2qpxa562o606hd"
    },
     "50": {
       "comment": "vvvvvvvv",
       "fromUname": "Anonymous",
       "time": 1313431865,
       "UTC": "2011-08-15T19: 11: 05+01: 00",
       "ip": "212.129.66.131",
       "id": "fu01r3z2vk12ar0avk65"
    },
     "51": {
       "comment": "xxxxccccc",
       "fromUname": "Anonymous",
       "time": 1313432538,
       "UTC": "2011-08-15T19: 22: 18+01: 00",
       "ip": "212.129.66.131",
       "id": "1fk5u60nkok8hyuzd0e6"
    },
     "52": {
       "comment": "xxxxccccc",
       "fromUname": "Anonymous",
       "time": 1313432587,
       "UTC": "2011-08-15T19: 23: 07+01: 00",
       "ip": "212.129.66.131",
       "id": "x20adl504ur7652r7x7b"
    },
     "53": {
       "comment": "'cccccccccccvvvvv",
       "fromUname": "Anonymous",
       "time": 1313432791,
       "UTC": "2011-08-15T19: 26: 31+01: 00",
       "ip": "212.129.66.131",
       "id": "nwk0m8lq7cc3s9748cve"
    },
     "54": {
       "comment": "aaaassss",
       "fromUname": "Anonymous",
       "time": 1313432849,
       "UTC": "2011-08-15T19: 27: 29+01: 00",
       "ip": "212.129.66.131",
       "id": "99fj5rl2ne7hzr78c691"
    },
     "55": {
       "comment": "asdffffffff",
       "fromUname": "Anonymous",
       "time": 1313477562,
       "UTC": "2011-08-16T07: 52: 42+01: 00",
       "ip": "212.129.66.131",
       "id": "y81iemo7t501dlwo3e52"
    },
     "56": {
       "comment": "Charlie",
       "fromUname": "Anonymous",
       "time": 1313525636,
       "UTC": "2011-08-16T21: 13: 56+01: 00",
       "ip": "212.129.66.130",
       "id": "k6bi9czy2g1941c7cid5"
    },
     "57": {
       "comment": "asdf",
       "fromUname": "Anonymous",
       "time": 1314036401,
       "UTC": "2011-08-22T19: 06: 41+01: 00",
       "ip": "212.129.66.131",
       "id": "zs4v1f7sr82f106p42gr"
    },
     "58": {
       "comment": "asdf2",
       "fromUname": "Anonymous",
       "time": 1314036666,
       "UTC": "2011-08-22T19: 11: 06+01: 00",
       "ip": "212.129.66.131",
       "id": "jg3y5xwilljq6hi7mpwd"
    },
     "59": {
       "comment": "qwerty",
       "fromUname": "Eamorr",
       "time": 1314550970,
       "UTC": "2011-08-28T18: 02: 50+01: 00",
       "ip": "212.129.66.131",
       "id": "uvoh7abs5u2kfogb28kr"
    },
     "60": {
       "comment": "qwerty",
       "fromUname": "Eamorr",
       "time": 1314551143,
       "UTC": "2011-08-28T18: 05: 43+01: 00",
       "ip": "212.129.66.131",
       "id": "u6eqi91y539mgv2ufxfw"
    },
     "61": {
       "comment": "qwerty2",
       "fromUname": "Eamorr",
       "time": 1314551158,
       "UTC": "2011-08-28T18: 05: 58+01: 00",
       "ip": "212.129.66.130",
       "id": "1dxz445s16qi17020y26"
    },
     "62": {
       "comment": "jacks",
       "fromUname": "Eamorr",
       "time": 1314633471,
       "UTC": "2011-08-29T16: 57: 51+01: 00",
       "ip": "212.129.66.131",
       "id": "3nkq2cxq2okb205z9ao6"
    }
  }
}

I’m trying to remove an entry according to ‘id’.

So, given id “3nkq2cxq2okb205z9ao6” (which happens to be the last entry, #62), how can I update this mongo collection to remove element 62?

I’m really stuck. I saw similar stackoverflow questions, but I really need something specific to this problem.

Any insight greatly appreciated.

Many thanks in advance,

  • 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-25T02:32:35+00:00Added an answer on May 25, 2026 at 2:32 am

    If the ID we are talking about is a MongoId (auto-created) then you should use;

    $collection->remove(array('id' => new MongoId('3nkq2cxq2okb205z9ao6')), true);

    but if id field is something you randomly generated then following code is good to go;

    $collection->remove(array('id' => '3nkq2cxq2okb205z9ao6'));

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

Sidebar

Related Questions

I have the following entry in my database: t.time :my_time_stamp In my controller I
I'm using Spring and struts and have the following entry in '/META-INF/context.xml' <Context cachingAllowed=false
I have the following log entry that I am processing in PowerShell I'm trying
I have an application web.xml with the following entry: <error-page> <error-code>404</error-code> <location>/system_files/error/p_notfound.jsp</location> </error-page> However,
I have the following construction: typedef struct bucket { char *key; ENTRY *data; struct
I have the following code in my index view. latest_entry_list = Entry.objects.filter(is_published=True).order_by('-date_published')[:10] for entry
I have the following in an XML file: <entry> ... <link href=http://www.example.com/somelink /> ...
I have the following XML document <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005' xmlns:issues='http://schemas.google.com/projecthosting/issues/2009' gd:etag='W/DEAERH47eCl7ImA9WhZTFEQ.'><id>http://code.google.com/feeds/issues/p/chromium/issues/full/921</id><published>2008-09-03T22:51:22.000Z</published><updated>2011-03-19T01:05:05.000Z</updated><title>Incorrect rendering</title><content
In my database, I have the following entry id | name | info 1
I have the following <div id=entries_list> <div id=entry_51 class=entry data-entry_id=51> some text </div> </div>

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.