Open mansi-aggarwal-2504 opened 4 years ago
My code looks like this: training_status <- mongo(collection = flag, db = database)
training_status <- mongo(collection = flag, db = database)
training_status$update(query = paste0('{"EndTime": { "$exists" : "',FALSE,'" }}'), update = paste0('{"$set":{"EndTime":"', Sys.time(),'"}}"'), multiple = FALSE)
I want to update the document where end time key doesn't exist with the data time stamp but this doesn't seem to work. Can someone help?
Thanks in advance.
My code looks like this:
training_status <- mongo(collection = flag, db = database)
training_status$update(query = paste0('{"EndTime": { "$exists" : "',FALSE,'" }}'), update = paste0('{"$set":{"EndTime":"', Sys.time(),'"}}"'), multiple = FALSE)
I want to update the document where end time key doesn't exist with the data time stamp but this doesn't seem to work. Can someone help?
Thanks in advance.