公告
财富商城
积分规则
提问
发文
2019-08-21 02:44发布
等我变得足够好
The following query is not working in route query: $body.Weather.Temperature in ['30','50']
I checked the documentation and the syntax looks right.
IN and NIN (not in) operator it used to check the item is or isn't in the array constants like ['wired', 'wifi'].
['wired', 'wifi']
For your case, you need use Comparison operator: >= and <= like this:
>=
<=
$body.Weather.Temperature >= 30 AND $body.Weather.Temperature <= 50
For detailed information you can reference "IoT Hub query language for device twins, jobs, and message routing".
Update:
For selecting the exact value 30/50 you can use the following query string as a workaround.
$body.Weather.Temperature = 30 OR $body.Weather.Temperature = 50
最多设置5个标签!
IN and NIN (not in) operator it used to check the item is or isn't in the array constants like
['wired', 'wifi']
.For your case, you need use Comparison operator:
>=
and<=
like this:$body.Weather.Temperature >= 30 AND $body.Weather.Temperature <= 50
For detailed information you can reference "IoT Hub query language for device twins, jobs, and message routing".
Update:
For selecting the exact value 30/50 you can use the following query string as a workaround.
$body.Weather.Temperature = 30 OR $body.Weather.Temperature = 50