Skip to content

Commit 708a4a3

Browse files
fix filter build error (#6214)
* fix filter build error * add example heading
1 parent 9bc95fe commit 708a4a3

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

source/reference/operator/aggregation/filter.txt

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -151,35 +151,34 @@ Examples
151151

152152
A collection ``sales`` has the following documents:
153153

154-
.. io-code-block::
155-
:copyable: true
156-
157-
.. input::
158-
:language: javascript
154+
.. code-block:: javascript
159155

160-
db.sales.insertMany( [
161-
{
162-
_id: 0,
163-
items: [
164-
{ item_id: 43, quantity: 2, price: 10, name: "pen" },
165-
{ item_id: 2, quantity: 1, price: 240, name: "briefcase" }
166-
]
167-
},
168-
{
169-
_id: 1,
170-
items: [
171-
{ item_id: 23, quantity: 3, price: 110, name: "notebook" },
172-
{ item_id: 103, quantity: 4, price: 5, name: "pen" },
173-
{ item_id: 38, quantity: 1, price: 300, name: "printer" }
174-
]
175-
},
176-
{
177-
_id: 2,
178-
items: [
179-
{ item_id: 4, quantity: 1, price: 23, name: "paper" }
180-
]
181-
}
182-
] )
156+
db.sales.insertMany( [
157+
{
158+
_id: 0,
159+
items: [
160+
{ item_id: 43, quantity: 2, price: 10, name: "pen" },
161+
{ item_id: 2, quantity: 1, price: 240, name: "briefcase" }
162+
]
163+
},
164+
{
165+
_id: 1,
166+
items: [
167+
{ item_id: 23, quantity: 3, price: 110, name: "notebook" },
168+
{ item_id: 103, quantity: 4, price: 5, name: "pen" },
169+
{ item_id: 38, quantity: 1, price: 300, name: "printer" }
170+
]
171+
},
172+
{
173+
_id: 2,
174+
items: [
175+
{ item_id: 4, quantity: 1, price: 23, name: "paper" }
176+
]
177+
}
178+
] )
179+
180+
Filter Based on Number Comparison
181+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183182

184183
The following example filters the ``items`` array to only include
185184
documents that have a ``price`` greater than or equal to ``100``:

0 commit comments

Comments
 (0)