RosettaCodeData/Task/Associative-array-Iteration/MiniScript/associative-array-iteration...

14 lines
216 B
Plaintext

d = { 3: "test", "foo": 3 }
for keyVal in d
print keyVal // produces results like: { "key": 3, "value": "test" }
end for
for key in d.indexes
print key
end for
for val in d.values
print val
end for