# Objects in Array...doesn't get more newbie than this!

**URL:** <https://forum.kirupa.com/t/objects-in-array-doesnt-get-more-newbie-than-this/267014>\
**Category:** flash\
**Created:** [July 27, 2008, 2:23pm UTC](https://forum.kirupa.com/t/objects-in-array-doesnt-get-more-newbie-than-this/267014 "2008-07-27T14:23:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenwio](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@Kenwio](https://forum.kirupa.com/u/Kenwio)\
**Post date:** [July 27, 2008, 2:23pm UTC](https://forum.kirupa.com/t/objects-in-array-doesnt-get-more-newbie-than-this/267014/1 "2008-07-27T14:23:55Z")

</div>

Hi!

I have:

```auto

//dataGrid is a DataGrid declared earlier
var cols:Array = dataGrid.columns;
trace(cols);

```

If I test/debug this I get:

> 

[object DataGridColumn],[object DataGridColumn],[Obje…

But I want to access the ‘dataField’ property of each DataGridColumn in the array ‘cols’.

How do I do that?

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 27, 2008, 2:36pm UTC](https://forum.kirupa.com/t/objects-in-array-doesnt-get-more-newbie-than-this/267014/2 "2008-07-27T14:36:11Z")

</div>

```auto

var len:uint = cols.length;
for (var i:int = 0; i < len; i ++) {
  trace(cols*.dataField);
};

```

---

<div class="post-metadata">

**Author:** ![Kenwio](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@Kenwio](https://forum.kirupa.com/u/Kenwio)\
**Post date:** [July 27, 2008, 2:43pm UTC](https://forum.kirupa.com/t/objects-in-array-doesnt-get-more-newbie-than-this/267014/3 "2008-07-27T14:43:09Z")

</div>

Tackar tack! 😉

Funny post by the way in the Random section…:beer2:

//Kenwio
