# Trouble selecting from each(function)

**URL:** https://forum.kirupa.com/t/trouble-selecting-from-each-function/330433
**Category:** Uncategorized
**Created:** [January 21, 2013, 9:21am UTC](https://forum.kirupa.com/t/trouble-selecting-from-each-function/330433 "2013-01-21T09:21:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mrManIsHere](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@mrManIsHere](https://forum.kirupa.com/u/mrManIsHere)
#### Post date: [January 21, 2013, 9:21am UTC](https://forum.kirupa.com/t/trouble-selecting-from-each-function/330433/1 "2013-01-21T09:21:44Z")

</div>

I’m having some troubles selecting only one, inside an .each-function.  
So far i’ve been able to look through the xml and it gives me #36 rows, but now I only wan’t to append one of the 36 rows. I’ve tried with [1] inside the “temp”-var but it only gives me the first letter on each row.

```php
 $(xml).find('temperature').each(function(i)
{ //alert(i);
 var temp = $(this).attr('value');
$("<p></p>").html(temp).appendTo("#tempDiv"); }); 

```
