so I am definately a beginner when it comes to javascript and jquery, and I am currently trying to parse through this xml (which is a response from an API call). The problem I am having is I am not sure how to parse through the xml file in order to get some values.
<group_user>
<id type="integer">2671029</id>
<created_at type="datetime">2013-01-20T21:42:01+00:00</created_at>
<comments_count type="integer">0</comments_count>
<moderator_at type="datetime" nil="true"/>
<user>
<id type="integer">5586131</id>
<first_name>Melora</first_name>
</user>
</group_user>
<group_user>
<id type="integer">2026289</id>
<created_at type="datetime">2012-06-08T04:22:38+00:00</created_at>
<comments_count type="integer">38</comments_count>
<moderator_at type="datetime" nil="true"/>
<user>
<id type="integer">6082517</id>
<first_name>Cindy</first_name>
</user>
for all the users (not group_users) I want to store/ consolelog all of the id's and all of the first names.
Right now I am doing:
var name = $(xml).find("first_name").text();
console.log(name);
var id = $(xml).find("id").text();
console.log(id);
but that just gives me a giant list of all id's and names concatenated together. I want to be able to see them as separate elements.