Skip to content

Commit 5c97ad8

Browse files
committed
changes after review
1 parent 6559856 commit 5c97ad8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/iot-central/core/howto-manage-devices-with-rest-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ Use **$filter** to create expressions that filter the list of devices. The follo
254254
| -------------------- | ------ | --------------------------------------- |
255255
| Equals | eq | id eq 'device1' and scopes eq 'redmond' |
256256
| Not Equals | ne | Enabled ne true |
257-
| Less than or equals | le | indexof(displayName, 'device1') le -1 |
258-
| Less than | lt | indexof(displayName, 'device1') lt 0 |
259-
| Greater than or equals | ge | indexof(displayName, 'device1') ge 0 |
260-
| Greater than | gt | indexof(displayName, 'device1') gt 0 |
257+
| Less than or equals | le | contains(displayName, 'device1') le -1 |
258+
| Less than | lt | contains(displayName, 'device1') lt 0 |
259+
| Greater than or equals | ge | contains(displayName, 'device1') ge 0 |
260+
| Greater than | gt | contains(displayName, 'device1') gt 0 |
261261

262262
The following table shows the logic operators you can use in *$filter* expressions:
263263

@@ -280,10 +280,10 @@ Currently, *$filter* works with the following device fields:
280280

281281
**$filter supported functions:**
282282

283-
Currently, the only supported filter function for device lists is the `indexof` function:
283+
Currently, the only supported filter function for device lists is the `contains` function:
284284

285285
```
286-
$filter=indexof(displayName, 'device1') ge 0
286+
$filter=contains(displayName, 'device1') ge 0
287287
```
288288

289289
The following example shows how to retrieve all the devices where the display name has index the string `thermostat`:

0 commit comments

Comments
 (0)