Painting Blue Code
Simple, self-explanatory code snippets.
2017-01-27
Meteor - MongoDB update using a computed/dynamic field name
v
= "
secondPart
";
collectionName
.
update
(
{
filterHere
: "
example
" }
, {
$set
: {
[
'
firstPart
.'
+
v
+
'.
thirdPart
'
]
: "
fieldValue
"
}
}
);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment