Skip to content

Commit

Permalink
docs: add documentation of arrayIndexesAsKeys option in README
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodrig committed Feb 24, 2024
1 parent 9f7b734 commit b404559
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ The array of keys that is returned can then be used with the
at a specific key path.

Options (optional):
- arrayIndexesAsKeys - `Boolean` (Default `false`) - Should array indexes be used as keys in the generated path?
- Example:
```json
[
{
"list": [
{
"a": 1
},
{
"a": 2
}
]
}
]
```
- arrayIndexesAsKeys = `false` results in: `['list.a']`
- arrayIndexesAsKeys = `true` results in: `['list.0.a', 'list.1.a']`
- expandNestedObjects - `Boolean` (Default: `true`) - Should nested objects appearing in the provided object also be expanded, such asthat keys appearing in those objects are extracted and included in the returned key path list?
- Example:
```json
Expand Down

0 comments on commit b404559

Please sign in to comment.