-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for getting array index in GetValue
Add the ability to use an index number to get an item out of a slice. The number will still be a string representation of an integer. For example, to get the last element from a nested slice like: ``` data := map[string]interface{}{ "data": []interface{}{ "first", "second", "third", }, } ``` Use keys like ``` val := GetValues(data, "data", "2") ```
- Loading branch information
Showing
2 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters