Associative arrays
suggest changeVersions
[{“Name”:“4.0”,“GroupName”:null},{“Name”:“4.1”,“GroupName”:null},{“Name”:“4.2”,“GroupName”:null},{“Name”:“4.3”,“GroupName”:null},{“Name”:“4.4”,“GroupName”:null}]
Syntax
- declare -A assoc_array # without initializing
- declare -A assoc_array=( [key]=“value” [another key]=“mind the spaces” [ three spaces ]=“all blanks sum up”)
- echo ${assoc_array[@]} # the values
- echo ${!assoc_array[@]} # the keys
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents