Skip to content

Commit 566e584

Browse files
committed
fix: error
1 parent aecbeda commit 566e584

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • docs/versions/v3/functions

docs/versions/v3/functions/obj.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ Chiori
7070

7171
- **Deeply nested keys.** The `get` function is particularly useful when you need to access nested keys within an object without having to worry about whether each level of the object exists. It helps prevent errors that can occur when trying to access keys on `nil`. For example, if you try to access `obj.game.genshin.char.name` directly and any of those keys (`game`, `genshin`, `name` or `char`) do not exist, it would throw an error. Using `get` allows you to safely retrieve the value without risking an error, as it will simply return `nil` if the path does not exist.
7272
- **Accessing non-valid keys.** Another use-case is when you need to access a key that is not a valid identifier, like `1st`, `naïve`, `日本`, `na$me` or even an empty string.
73-
- **Keys with dot.** If your key contains a dot (`.`) in its name, you can access it simply by specifying the key name. Example: `{{ {"x.y": "Y"}.get('x.y') }}` will result in `Y`.
73+
- **Keys with dot.** If your key contains a dot (`.`) in its name, you can access it simply by specifying the key name. Example: <code v-pre>{{ {"x.y": "Y"}.get('x.y') }}</code> will result in `Y`.

0 commit comments

Comments
 (0)