Access element name (no value) from array with javascript
<p>Sorry if my question is bad. I'm stuck in the following simple javascript code:</p>

<pre><code>var person={fname:"John",lname:"Doe",age:25};

for (x in person)
{
document.write(person[x] + " ");
}
</code></pre>

<p>The above code result is :  John Doe 25</p>

<p>How do you show only value from <code>lname</code> element ? (with <code>for (... in ...)</code> statement)</p>

<p>I don't want to use <code>person={"John","Doe",25}</code> instead of one of above. I want to know how to access the element from array to get value.</p>

<p>Thank you</p>

<p>Edit: Thanks all for responses. This question was created because I have many items in array like :</p>

<pre><code>        [{Name="A 1", Email="a1@manufacturer.com", Group="Group1"},
        {Name="A 2", Email="a2@manufacturer.com", Group="Group2"},
        {Name="A 3", Email="a3@manufacturer.com", Group="Group3"},
        {Name="B 1", Email="b1@manufacturer.com", Group="Group1"},
        {Name="V 1", Email="b1@manufacturer.com", Group="Group2"},
        {Name="X 1", Email="b1@manufacturer.com", Group="Group4"},
        {Name="Y 1", Email="b1@manufacturer.com", Group="Group3"},
        {Name="Z 1", Email="b1@manufacturer.com", Group="Group3"},
        {Name="W 1", Email="b1@manufacturer.com", Group="Group6"}]
</code></pre>

<p>I want to iterate this array and compare the element with my owned value.
<code>if object1.Group == 'Group3' { code }</code></p>
