Does zsh support hash table as a built-in data type?

If supported, which version of zsh should I use to take advantage of this feature? How to declare and use it in code?


Solution 1:

Zsh supports hash tables, a quick google search returns many results, here's one

You must first typeset the variable:

% typeset -A hash

then you can store items in the table:

% hash[brown]="mm..  hash browns"
% hash[table]="clever data structure"

then you recover them as usual with arrays:

% print ${hash[brown]}