Skip to content

Commit

Permalink
docs(set): update example to correctly handle numeric keys as object …
Browse files Browse the repository at this point in the history
…properties
  • Loading branch information
nightohl committed Feb 8, 2025
1 parent 30c10df commit f2651ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/object/set.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ set({}, 'name', 'ra')

set({}, 'cards[0].value', 2)
// => { cards: [{ value: 2 }] }

set({}, 'user.1083.name', 'Alice')
// => { user: { "1083": { name: 'Alice' } } }
```

0 comments on commit f2651ef

Please sign in to comment.