[DOCS-6321] Comment on: "about/support.txt" Created: 05/Oct/15  Updated: 03/Nov/17  Resolved: 14/Oct/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://www.mongodb.org/about/support/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
Referrer: https://www.google.co.in/
Screen Resolution: 1280 x 1024
repo: mongodb-www-about
source: support


Participants:
Days since reply: 8 years, 18 weeks, 1 day ago

 Description   

{
"_id" : "98856426593333333",
"created_on" : ISODate("2015-10-01T17:27:00.492+05:30"),
"updated_on" : ISODate("2015-10-01T18:15:07.472+05:30"),
"version" : NumberLong(44370350747263521),
"somtest" : {
"cmpid_taskid" : {
"trans_date" : ISODate("2015-09-25T05:00:00.000+05:30"),
"val" : [
{
"TASK_ID" :

{ "val" : "9-GFT-NE012-15093008_AP", "count" : NumberLong(1) }

,
"GRID_ID" :

{ "val" : NumberLong(1006111), "count" : NumberLong(1) }

,
"trans_date" : ISODate("2015-09-25T05:00:00.000+05:30"),
"CAMP_ID" :

{ "val" : "9-GFC-5026_AP11", "count" : NumberLong(2) }

}
]
}
}
}

from above document i want to pull the
"CAMP_ID" :

{ "val" : "9-GFC-5026_AP11", "count" : NumberLong(2) }

i tried with this query
db.microrecoprofiledeletecollection.update({},{$pull:{ "cmpid_taskid":

{CMP_ID.val:"9-GFC-5026_AP"}

}},

{multi:true}

);



 Comments   
Comment by Kay Kim (Inactive) [ 14/Oct/15 ]

I believe StackOverflow is a better forum for questions like this.

In any case, have you tried

 
db.microrecoprofiledeletecollection.update({ "somtest.cmpid_taskid.val.CAMP_ID.val":"9-GFC-5026_AP11"}, 
{ $unset: { "somtest.cmpid_taskid.val.$.CAMP_ID": ""}}, 
{multi:true}
);
 
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })

Generated at Thu Feb 08 07:52:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.