Skip to content

Commit 4fdf8b3

Browse files
committed
incorporate feedback
1 parent 216e9d3 commit 4fdf8b3

File tree

1 file changed

+5
-5
lines changed
  • articles/azure-resource-manager/bicep/diagnostics

1 file changed

+5
-5
lines changed

articles/azure-resource-manager/bicep/diagnostics/bcp414.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: BCP414
33
description: The `^` indexing operator can't be used on base expressions of type <data-type>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 05/20/2025
6+
ms.date: 05/27/2025
77
---
88

99
# Bicep diagnostic code - BCP414
@@ -31,15 +31,15 @@ var config = {
3131
output result any = config[^1] // Error: BCP414 - The "^" indexing operator cannot be used on base expressions of type "object".
3232
```
3333

34-
To access properties of an object, use the `.` operator instead of `^`. The following code corrects the previous example.
34+
Object properties aren't ordered, so they can't be accessed in reverse. The `^` operator also isn't supported when accessing properties with square bracket notation.
3535

3636
```bicep
37-
var config = {
38-
name: 'example'
37+
var config = {
38+
'property name': 'example'
3939
value: 42
4040
}
4141
42-
output result string = config.name
42+
output result string = config['property name']
4343
```
4444

4545
## Next steps

0 commit comments

Comments
 (0)