Skip to content

Commit d2b5074

Browse files
committed
Updating json template examples.
1 parent 23c850f commit d2b5074

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

articles/healthcare-apis/iot/how-to-use-iot-jsonpath-content-mappings.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,21 @@ If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContent
5858

5959
```json
6060

61-
"templateType": "IotJsonPathContentTemplate",
62-
"template": {
63-
"typeName": "heartrate",
64-
"typeMatchExpression": "$..[?(@Body.heartRate)]",
65-
"timestampExpression": "$.endDate",
66-
"values": [
67-
{
68-
"required": "true",
69-
"valueExpression": "$.Body.heartRate",
70-
"valueName": "hr"
71-
}
72-
]
73-
}
61+
{
62+
"templateType": "IotJsonPathContentTemplate",
63+
"template": {
64+
"typeName": "heartrate",
65+
"typeMatchExpression": "$..[?(@Body.heartRate)]",
66+
"timestampExpression": "$.endDate",
67+
"values": [
68+
{
69+
"required": "true",
70+
"valueExpression": "$.Body.heartRate",
71+
"valueName": "hr"
72+
}
73+
]
74+
}
75+
}
7476

7577
```
7678

@@ -100,20 +102,23 @@ If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContent
100102
```json
101103

102104
{
105+
"templateType": "IotJsonPathContentTemplate",
106+
"template": {
103107
"typeName": "bloodpressure",
104108
"typeMatchExpression": "$..[?(@Body.systolic && @Body.diastolic)]",
105109
"values": [
106-
{
110+
{
107111
"required": "true",
108112
"valueExpression": "$.Body.systolic",
109113
"valueName": "systolic"
110-
},
111-
{
114+
},
115+
{
112116
"required": "true",
113117
"valueExpression": "$.Body.diastolic",
114118
"valueName": "diastolic"
115-
}
119+
}
116120
]
121+
}
117122
}
118123

119124
```

0 commit comments

Comments
 (0)