is there a way to upsert a complete json sub doc (array) under a new parent ? I create a new doc which looks like this
{
"transaction": "5936F5BF67F91",
"status": "OK",
"replycoded": "000",
"pointcode": "243.100.000",
"ao": "6010",
"carriername": "AT&T",
"cat": "WIRELESS",
"lata": "730",
"cname": "WIRELESS CALLER"
}
i want now to update the doc with the folowing data under CodeOwner
{
"region": "WC",
"status": "AS",
"ocn": "6006",
"date_assigned": "2014-09-05"
}
so that my new doc looks like this
{
"transaction": "5936F5BF67F91",
"status": "OK",
"replycoded": "000",
"pointcode": "243.100.000",
"ao": "6010",
"carriername": "AT&T",
"cat": "WIRELESS",
"lata": "730",
"cname": "WIRELESS CALLER",
"CodeOwner": {
"region": "WC",
"status": "AS",
"ocn": "6006",
"date_assigned": "2014-09-05"
}
}
i know i can do it via individual items like
$bucket->mutateIn("$myNbr")
->upsert('CodeOwne.region', 'WC', ['createPath' => true])
->upsert('CodeOwne.status', 'AS', ['createPath' => true])
->upsert('CodeOwne.ocn', '6006', ['createPath' => true])
->upsert('CodeOwne.date_assigned', '2014-09-05', ['createPath' => true])
->execute();
but i am trying to see if there is a way to create the whole thing in one