how to get json array element value


i have json array follows

{    "cnt": 20,    "list": [      {        "coord": {          "lon": 77.6,          "lat": 12.98        },        "sys": {          "type": 1,          "id": 7821,          "message": 0.015,          "country": "in",          "sunrise": 1505176722,          "sunset": 1505220758        },        "weather": [          {            "id": 802,            "main": "clouds",            "description": "scattered clouds",            "icon": "03d"          }        ],        "main": {          "temp": 302.63,          "pressure": 1012,          "humidity": 58,          "temp_min": 302.15,          "temp_max": 303.15        },        "visibility": 10000,        "wind": {          "speed": 4.1,          "deg": 110        },        "clouds": {          "all": 40        },        "dt": 1505207584,        "id": 1277333,        "name": "bangalore"      }]

i want filter data coming device based on temp value .if temp is greater 360 data has store iot hub.

list->main->temp

(select * input  temp>360)

how can write condition in stream analytics job itself.(not programmatically)



ram

do need save of json above or need extract json object containing temperature? there 2 elements in "list" array. "temp" value want use. if 1 above 360 , below?

the simple way parse complex json objects in asa write custom javascript function , use in query. see https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-javascript-user-defined-functions 



Microsoft Azure  >  Azure Stream Analytics



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'