<p>I have a variable of type <code>Dynamic</code> and I know for sure one of its fields, lets call it <code>a</code>, actually is an array. But when I'm writing </p>

<pre><code>var d : Dynamic = getDynamic();
for (t in d.a) {
}
</code></pre>

<p>I get a compilation error on line two:</p>

<blockquote>
  <p>You can't iterate on a Dynamic value, please specify Iterator or Iterable</p>
</blockquote>

<p>How can I make this compilable?</p>

Haxe can't iterate over
```
Dynamic
```
variables (as the compiler says).
You can make it work in several ways, where this one is probably easiest (depending on your situation):
```
```
var d : {a:Array<Dynamic>} = getDynamic();
for (t in d.a) { ... }
```
```
You could also change
```
Dynamic
```
to the type of the contents of the array.