mongodb-update Questions
9
Solved
I have a field in mongodb that's a string: {"field": "some text"}. I want to convert them all into single-element arrays containing the string: {"field": ["some t...
Heptachord asked 13/9, 2011 at 11:52
4
Solved
If I have a document with the following basic structure:
{
...
Monday: { a:1, b:2 },
Tuesday: { c:3, d:4 }
...
}
Am I able to 'push' an additional key:value pair to Monday's value? Result wo...
Ruthi asked 11/8, 2016 at 4:13
8
Solved
How do I concatenate values from two string fields and put it into a third one?
I've tried this:
db.collection.update(
{ "_id": { $exists: true } },
{ $set: { column_2: { $add: ['$column_4', '$...
Swanhilda asked 10/10, 2012 at 13:15
11
Solved
I have a lot of mongodb documents in a collection of the form:
{
....
"URL":"www.abc.com/helloWorldt/..."
.....
}
I want to replace helloWorldt with helloWorld to get:
{
....
"URL":"www.abc.com...
Nestle asked 25/9, 2012 at 19:29
2
Solved
I have the following model for users:
var UserSchema = new mongoose.Schema({
name: String,
dob: Date,
sex: String,
photo: String,
email: {type: String, index: {unique: true, required: true}}...
Judicial asked 11/11, 2014 at 12:50
1
Solved
My main concern is about in mongodb documentation they use $elemMatch command for find and pull the element from array, but this is not work when i use.
My document structure is
{
"_id" : ObjectId...
Cinematography asked 27/8, 2015 at 6:50
1
Solved
rowsI am attempting to perform a mongodb update on each field in an array of records.
An example schema is below:
{
"_id" : ObjectId("508710f16dc636ec07000022"),
"summary" : "",
"uid" : "ABCDE...
Doornail asked 23/10, 2012 at 22:31
1
© 2022 - 2024 — McMap. All rights reserved.