Associative Arrays (HashMaps)
Here's a syntax we could use for associative array creation:
$ let hashmap = [ '&red=F00' '&blue=00F' ]
$ echo @hashmap['red']
FOO
And each associative array may contain further sub-elements:
$ let hashmap = [ '&user1={ &name="Michael" &id="1624" }' ]
$ echo @hashmap['user1']
> &name="Michael" &id="1624"
$ echo @hashmap['user1']['name']
> Michael
Sub-elements could be interpreted as arrays
$ let hashmap = [ '&users={&user1="1" &user2="2" &user3="3"}' ]
$ for user in @hashmap['users']
$ echo $user
$ end
> &user1="1"
> &user2="2"
> &user3="3"
Sub-elements may even be arrays themselves
$ let hashmap = [ '&team1=["12" "23" "21" "8"]' '&team2=["24" "8" "12" "30"]' ]
$ for score in @hashmap['team1']; echo $score; end
> 12
> 23
> 21
> 8
$ for score in @hashmap['team2']; echo $score; end
> 24
> 8
> 12
> 30