Of the following examples, the top two return [object, object], but the third returns what I would expect from the first two, which is "Next"
alert(sceChoicesArr);
alert(sceChoicesArr[0]);
alert(sceChoicesArr[0].text());
Here's the array being created:
var sceChoicesArr = [];
$(xml).find('choice').each(function(){sceChoicesArr.push($(this));});
And here's the bit of xml it's looking for in the line above:
<choice>Next</choice>
I'm trying to spit out the array into html, and I keep writing things out off examples like the ones on this page: Display all items in array using jquery as well as this: http://jsfiddle.net/chrisabrams/hYQm4/ but none of these examples seem to be able to pull out the value inside the array, as when I check it out with an alert, all I'm getting is [object, object]
So my question is, what is [object, object], and why am I getting that instead of "Next"?
It seems to me that the only value of my array should equate to ["Next"]