Javascript Array of objects - how do i loop through and get the object values
<p>Im having some issues creating an array of objects in javascript</p>

<p>Please see my code below and tell me where im going wrong..</p>

<p>I simply want to loop through and access the values</p>

<pre><code>&lt;!-- Read XML Script --&gt;
&lt;script type="text/javascript"&gt;

    // Object array
    var myArray = [];

    $(document).ready(function () {
        $.ajax({
            type: "GET",
            url: "HighScore.xml",
            dataType: "xml",
            success: function (xml) {
                $(xml).find('challenger').each(function () {

                    var name = $(this).find('Name').text();
                    var watts = $(this).find('Watts').text();
                    var Mins = $(this).find('Mins').text();

                    // objects in the array
                    challenger = new Object();
                    challenger.name = name;
                    challenger.watts = watts;
                    challenger.Mins = Mins;

                    myArray.push(challenger);

                });

                // look into the array
                for (obj in myArray) {
                    // do i need to cast ?? how can i view the object ??
                    alert(obj + " - ");
                }


            },
            error: function () {
                alert("error");
            }
        });
    });

&lt;/script&gt;
</code></pre>
