# Nested associative arrays OR associative arrays of dynamic arrays

**URL:** <https://verificationacademy.com/forums/t/nested-associative-arrays-or-associative-arrays-of-dynamic-arrays/31779>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog\
**Created:** [May 2, 2016, 4:31pm UTC](https://verificationacademy.com/forums/t/nested-associative-arrays-or-associative-arrays-of-dynamic-arrays/31779 "2016-05-02T16:31:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [May 2, 2016, 5:13pm UTC](https://verificationacademy.com/forums/t/nested-associative-arrays-or-associative-arrays-of-dynamic-arrays/31779/2 "2016-05-02T17:13:43Z")

</div>

\*In reply to [ravi.ck.kumar](https://verificationacademy.com/forums/t/nested-associative-arrays-or-associative-arrays-of-dynamic-arrays/31779):\*Yes. SystemVerilog supports arrays whose elements can be of any type. When dealing with dynamically sized array, you can think of it as arrays of arrays instead of multi-dimensional arrays. because an array element in each dimension can have a different number of elements.  
You can declare arrays of arrays by using an intermediate typedef (preferred)

```verilog
typedef int int_index_by_str_t[string];
int_index_by_str_t lookup[];
or
int lookup[][string];

```

---

_[View the full topic](https://verificationacademy.com/forums/t/nested-associative-arrays-or-associative-arrays-of-dynamic-arrays/31779)._
