Skip to content

Commit 53cc92d

Browse files
authored
Merge pull request #206023 from seesharprun/patch-1
Cosmos DB | Update partial doc sample ops
2 parents 6ae3d3c + 2062189 commit 53cc92d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

articles/cosmos-db/partial-document-update.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ An example target JSON document:
3232
"id": "e379aea5-63f5-4623-9a9b-4cd9b33b91d5",
3333
"name": "R-410 Road Bicycle",
3434
"price": 455.95,
35+
"inventory": {
36+
"quantity": 15
37+
},
3538
"used": false,
3639
"categoryId": "road-bikes"
3740
}
@@ -44,6 +47,7 @@ A JSON Patch document:
4447
{ "op": "add", "path": "/color", "value": "silver" },
4548
{ "op": "remove", "path": "/used" },
4649
{ "op": "set", "path": "/price", "value": 355.45 }
50+
{ "op": "increment", "path": "/inventory/quantity", "value": 10 }
4751
]
4852
```
4953

@@ -54,6 +58,9 @@ The resulting JSON document:
5458
"id": "e379aea5-63f5-4623-9a9b-4cd9b33b91d5",
5559
"name": "R-410 Road Bicycle",
5660
"price": 355.45,
61+
"inventory": {
62+
"quantity": 25
63+
},
5764
"categoryId": "road-bikes",
5865
"color": "silver"
5966
}

0 commit comments

Comments
 (0)