@@ -254,10 +254,10 @@ Use **$filter** to create expressions that filter the list of devices. The follo
254
254
| -------------------- | ------ | --------------------------------------- |
255
255
| Equals | eq | id eq 'device1' and scopes eq 'redmond' |
256
256
| 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 |
261
261
262
262
The following table shows the logic operators you can use in * $filter* expressions:
263
263
@@ -280,10 +280,10 @@ Currently, *$filter* works with the following device fields:
280
280
281
281
** $filter supported functions:**
282
282
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:
284
284
285
285
```
286
- $filter=indexof (displayName, 'device1') ge 0
286
+ $filter=contains (displayName, 'device1') ge 0
287
287
```
288
288
289
289
The following example shows how to retrieve all the devices where the display name has index the string ` thermostat ` :
0 commit comments