breve types: hash vs. list

With a list, I can do the following:

foreach item in myList:
    item do-something.

But this doesn't appear to be possible with a hash. Is there a way to do a "foreach" that gets me every object contained in the hash? I'm using strings as keys, and the order in which I get the items is unimportant.

Suggestions? Thanks in advance!

breve types: hash vs. list

This functionality existed in the engine but wasn't exposed -- I added a function to return the list of keys for a hash. It will be available with the next beta build (later today or tomorrow).

- jon

breve types: hash vs. list

Great! Thanks.

breve types: hash vs. list

The new build is up now, give it a try.

- jon

breve types: hash vs. list

Works perfectly. :D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.