Skip to content

Instantly share code, notes, and snippets.

@bendalton
Created April 22, 2009 00:46
Show Gist options
  • Save bendalton/99504 to your computer and use it in GitHub Desktop.
Save bendalton/99504 to your computer and use it in GitHub Desktop.
// Example usage
// var myResultCollection:ArrayCollection = parseResult(event.result.serverInfo);
public function parseResult(result:Object):ArrayCollection
{
var collection:ArrayCollection = new ArrayCollection();
for each(var resultArray:Array in result.initialData)
{
var resultObject:Object = new Object();
for(var i:Number = 0; i<result.columnNames;i++)
{
resultObject[result.initialData[i]] = resultArray[i];
}
collection.push(resultObject);
}
return collection;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment