Getting data from associative array with .next()

In reply to cgales:

Added full code to the post. Sorry for not doing it from the beginning:)