# How to retrieve all values at a particular nth index in a multi dimensional associative array?

**URL:** <https://verificationacademy.com/forums/t/how-to-retrieve-all-values-at-a-particular-nth-index-in-a-multi-dimensional-associative-array/31533>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, Multi-dimensional-arrays, associative-array, for-loop\
**Created:** [February 22, 2016, 9:20am UTC](https://verificationacademy.com/forums/t/how-to-retrieve-all-values-at-a-particular-nth-index-in-a-multi-dimensional-associative-array/31533 "2016-02-22T09:20:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kambhamvivekshankar](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/k/e36b37/32.png) [@kambhamvivekshankar](https://verificationacademy.com/forums/u/kambhamvivekshankar)\
**Post date:** [February 23, 2016, 12:34pm UTC](https://verificationacademy.com/forums/t/how-to-retrieve-all-values-at-a-particular-nth-index-in-a-multi-dimensional-associative-array/31533/3 "2016-02-23T12:34:56Z")

</div>

_In reply to [Anudeep J](https://verificationacademy.com/forums/t/how-to-retrieve-all-values-at-a-particular-nth-index-in-a-multi-dimensional-associative-array/31533/2):_

Hi Anudeep,

This approach will loop through unnecessary values of j right? Anyway to overcome it.

As you mentioned, some of the elements may not exists. I am looking for a way to constrain values of i and k to provide only valid indices. Any suggestions on how this can be achieved, are welcome.

Thank you

Regards,  
KVS

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-retrieve-all-values-at-a-particular-nth-index-in-a-multi-dimensional-associative-array/31533)._
