Skip to content

Commit 771d3de

Browse files
authored
Merge pull request #123807 from johnlokerse/patch-4
Updated Bicep function empty() with null documentation
2 parents df51553 + aaa0d11 commit 771d3de

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

articles/azure-resource-manager/bicep/bicep-functions-object.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,34 @@ The output from the preceding example with the default values is:
6969

7070
`empty(itemToTest)`
7171

72-
Determines if an array, object, or string is empty.
72+
Determines if an array, object, or string is empty or null.
7373

7474
Namespace: [sys](bicep-functions.md#namespaces-for-functions).
7575

7676
### Parameters
7777

7878
| Parameter | Required | Type | Description |
7979
|:--- |:--- |:--- |:--- |
80-
| itemToTest |Yes |array, object, or string |The value to check if it's empty. |
80+
| itemToTest |Yes |array, object, or string |The value to check if it's empty or null. |
8181

8282
### Return value
8383

84-
Returns **True** if the value is empty; otherwise, **False**.
84+
Returns **True** if the value is empty or null; otherwise, **False**.
8585

8686
### Example
8787

88-
The following example checks whether an array, object, and string are empty.
88+
The following example checks whether an array, object, and string are empty or null.
8989

9090
```bicep
9191
param testArray array = []
9292
param testObject object = {}
9393
param testString string = ''
94+
param testNullString string?
9495
9596
output arrayEmpty bool = empty(testArray)
9697
output objectEmpty bool = empty(testObject)
9798
output stringEmpty bool = empty(testString)
99+
output stringNull bool = empty(testNullString)
98100
```
99101

100102
The output from the preceding example with the default values is:
@@ -104,6 +106,7 @@ The output from the preceding example with the default values is:
104106
| arrayEmpty | Bool | True |
105107
| objectEmpty | Bool | True |
106108
| stringEmpty | Bool | True |
109+
| stringNull | Bool | True |
107110

108111
## intersection
109112

0 commit comments

Comments
 (0)