Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nested object data

try {
  Files.updateOne(
    { _id: document._id },
    { "a.b.c": "new text" },
    function (err, result) {
      if (err) {
        res.send(err);
      } else {
        res.send(result);
      }
    }
  );
} catch (err) {
  res.status(400).send(err);
}
Source by peaku.co #
 
PREVIOUS NEXT
Tagged: #nested #object #data
ADD COMMENT
Topic
Name
3+9 =