Skip to content

Commit 5d38faf

Browse files
committed
add example to get property from object
1 parent fed463b commit 5d38faf

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

articles/azure-resource-manager/templates/data-types.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes the data types that are available in Azure Resource Manag
44
ms.topic: conceptual
55
ms.author: tomfitz
66
author: tfitzmac
7-
ms.date: 04/27/2022
7+
ms.date: 06/27/2022
88
---
99

1010
# Data types in ARM templates
@@ -121,6 +121,34 @@ Objects start with a left brace (`{`) and end with a right brace (`}`). Each pro
121121
}
122122
```
123123

124+
You can get a property from an object with dot notation.
125+
126+
```json
127+
{
128+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
129+
"contentVersion": "1.0.0.0",
130+
"parameters": {
131+
"exampleObject": {
132+
"type": "object",
133+
"defaultValue": {
134+
"name": "test name",
135+
"id": "123-abc",
136+
"isCurrent": true,
137+
"tier": 1
138+
}
139+
}
140+
},
141+
"resources": [
142+
],
143+
"outputs": {
144+
"nameFromObject": {
145+
"type": "string",
146+
"value": "[parameters('exampleObject').name]"
147+
}
148+
}
149+
}
150+
```
151+
124152
## Strings
125153

126154
Strings are marked with double quotes.

0 commit comments

Comments
 (0)