Skip to content

Commit 8ff51c6

Browse files
authored
Refine $mergeObjects documentation details
1 parent aa13bbe commit 8ff51c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/cosmos-db/mongodb/vcore/operators/object-expression/$mergeobjects.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: $mergeObjects
3-
titleSuffix: Overview of the $mergeObjects expression in Azure Cosmos DB for MongoDB (vCore)
3+
titleSuffix: Overview of the $mergeObjects operator in Azure Cosmos DB for MongoDB (vCore)
44
description: The $mergeObjects operator merges multiple documents into a single document
55
author: abinav2307
66
ms.author: abramees
77
ms.service: azure-cosmos-db
88
ms.subservice: mongodb-vcore
99
ms.topic: language-reference
10-
ms.date: 08/03/2025
10+
ms.date: 09/04/2025
1111
---
1212

1313
# $mergeObjects
@@ -30,7 +30,7 @@ The `$mergeObjects` operator combines multiple documents into a single document.
3030

3131
## Examples
3232

33-
Let's understand the usage with sample json from `stores` dataset.
33+
Consider this sample document from the stores collection.
3434

3535
```json
3636
{
@@ -144,7 +144,7 @@ Let's understand the usage with sample json from `stores` dataset.
144144

145145
### Example 1 - Merging documents as an accumulator to group documents by the sales subdocument
146146

147-
The query is an aggregation pipeline that uses $mergeObjects to merge all sales subdocuments per city for a specific company.
147+
The query merges all sales subdocuments per city for a specific company.
148148

149149
```javascript
150150
db.stores.aggregate([
@@ -167,7 +167,7 @@ db.stores.aggregate([
167167
])
168168
```
169169

170-
The query groups store documents by city for the company "Fourth Coffee" and merges their sales fields into a single object per city.
170+
The first two results returned by this query are:
171171

172172
```json
173173
[

0 commit comments

Comments
 (0)