Is it possible using Node JS driver for MongoDB (any) to do the following in one statement (e.g. findOneAndUpdate) to either increment 'value' using $inc of the p_h array element matching timestamp: 1478563200000 or insert new element to p_h array with initial 'value' and 'timestamp': 1478563200000?
{
"_id" : "582372aa7e46c41988b0016c,
"p_h" : [
{
"value" : 10,
"timestamp" : 1478563200000,
},
{
"value" : 15,
"timestamp" : 1478564200000,
}
]
}