Foreach loop for struct of arrays

In reply to Prathyusha Sandilya:

hash_id and hash_index are dynamic arrays and need to be allocated with the new[] operator. Or did you mean to declare these as associative arrays as well?