Answers for "patch if else use"

0

patch if else use

Documents.update(
    {some_condition: true}, 
    {$set: {"status": 
        {$cond: 
              {if  : {"some field": "some condition"}},
              {then:  "value 1"} ,
              {else: "value 2"} 
        } 
    }} 
)
Posted by: Guest on August-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language