Skip to content

Commit f0a7958

Browse files
fix filter build error (#6214)
* fix filter build error * add example heading
1 parent 6ae2d34 commit f0a7958

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
@@ -155,35 +155,34 @@ Examples
155155

156156
A collection ``sales`` has the following documents:
157157

158-
.. io-code-block::
159-
:copyable: true
160-
161-
.. input::
162-
:language: javascript
158+
.. code-block:: javascript
163159

164-
db.sales.insertMany( [
165-
{
166-
_id: 0,
167-
items: [
168-
{ item_id: 43, quantity: 2, price: 10, name: "pen" },
169-
{ item_id: 2, quantity: 1, price: 240, name: "briefcase" }
170-
]
171-
},
172-
{
173-
_id: 1,
174-
items: [
175-
{ item_id: 23, quantity: 3, price: 110, name: "notebook" },
176-
{ item_id: 103, quantity: 4, price: 5, name: "pen" },
177-
{ item_id: 38, quantity: 1, price: 300, name: "printer" }
178-
]
179-
},
180-
{
181-
_id: 2,
182-
items: [
183-
{ item_id: 4, quantity: 1, price: 23, name: "paper" }
184-
]
185-
}
186-
] )
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+
] )
183+
184+
Filter Based on Number Comparison
185+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
187186

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

0 commit comments

Comments
 (0)