# Quick question

**URL:** https://forum.kirupa.com/t/quick-question/319539
**Category:** Uncategorized
**Created:** [February 24, 2011, 4:22am UTC](https://forum.kirupa.com/t/quick-question/319539 "2011-02-24T04:22:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ajtyler](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ajtyler](https://forum.kirupa.com/u/ajtyler)
#### Post date: [February 24, 2011, 4:22am UTC](https://forum.kirupa.com/t/quick-question/319539/1 "2011-02-24T04:22:37Z")

</div>

I’ve got a function that passes in an object with about 30 properties.

The properties are entitled room0spot0, room0spot1, room0spot2, room1spot0, etc

I’d like to use a for loop to read these 30 properties into an array that would equivalently do:  
room[0][0] = o.room0spot0

How can I accomplish this?

I tried doing this:

```php

public function onReceiveRoomData(o:Object):void {
   for(var i=0;i<10;i++) {
    room*[0] = this["o.room"+i+"spot0"];
    room*[1] = this["o.room"+i+"spot1"];
    room*[2] = this["o.room"+i+"spot2"];
   }
}

```

but it doesn’t seem to find the property of the object passed.

Is there something I’m missing?
