# \*\*Multidimensional Array Expert Needed\*\*

**URL:** <https://forum.kirupa.com/t/multidimensional-array-expert-needed/299101>\
**Category:** flash\
**Created:** [October 29, 2009, 6:43pm UTC](https://forum.kirupa.com/t/multidimensional-array-expert-needed/299101 "2009-10-29T18:43:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newenay](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newenay](https://forum.kirupa.com/u/newenay)\
**Post date:** [October 29, 2009, 6:43pm UTC](https://forum.kirupa.com/t/multidimensional-array-expert-needed/299101/1 "2009-10-29T18:43:15Z")

</div>

Need some help parsing some .xml into a rather tricky array. I’m not sure if AS3 arrays work past the second node – “array[0][1].link”, but this works fine…“array[0].link”.

I have been reading about using an object instead of an array, as well as key & dictionarys, but am unsure how to implement.

Copy and paste into a new AS3 doc. Help is mucho appreciated :h:.

```auto
 
var xml:XML = 
<courses>
 <course name="Course One" id="0">
  <doc name="Doc One">www.google.com</doc>
 </course>
 <course name="Course Two" id="1">
  <doc name="Doc One">www.yahoo.com</doc>
  <doc name="Doc Two">www.adobe.com</doc>
  <doc name="Doc Three">www.kirupa.com</doc>
 </course>
</courses>;
var courseArr:Array = new Array();
var docArr:Array = new Array();
var il:XMLList = xml.course;
//var ml:XMLList = xml.course.doc;
for(var i:uint=0;i<il.length();i++){
 courseArr* = new Array(il.@name*,il.@id*);
 docArr* = new Array(il.@id*);
 
  trace(courseArr*[0]);
 
  for(var n:uint=0;n<il*.doc.length();n++){
   //docArr*.push(il*.doc.@name[n],il*.doc[n]);
   docArr*.push(il*.doc.@name[n]);
 
   //docArr*[n]["theLink"] = il*.doc[n];
   trace(docArr*[n+1] + "'s URL is: ");
   trace( il*.doc[n]);
  }
  trace("");
}
trace("How can I save each document's URL into the docArr???");

```
