# Comparing array object with XML node

**URL:** https://forum.kirupa.com/t/comparing-array-object-with-xml-node/78925
**Category:** Uncategorized
**Created:** [February 9, 2005, 4:26am UTC](https://forum.kirupa.com/t/comparing-array-object-with-xml-node/78925 "2005-02-09T04:26:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tross7](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tross7](https://forum.kirupa.com/u/Tross7)
#### Post date: [February 9, 2005, 4:26am UTC](https://forum.kirupa.com/t/comparing-array-object-with-xml-node/78925/1 "2005-02-09T04:26:40Z")

</div>

thnx for reading,  
here is my question:  
ive got a node of an xml and i assign it as below:  
\_root.Original = nodes\*.childNodes[1].firstChild.nodeValue;

and i have an array with some info in it:  
\_root.stateCoords = new Array();  
stateCoords[0] = {stateName:“state1”, state\_x:120, state\_y:135};

so I want to compare those two to see whether it is the same such as below:  
//let say that the xml node contains “state1”  
if(\_root.Original == \_root.stateCoords[0].stateName){  
//do something  
}

but whenever i do that, it return the value as false, i mean if i:  
trace(\_root.Original == \_root.stateCoords[0].stateName);  
it will return it as false.

I dont know what i am doing wrong. Could you help me with it?

cerios!! by Tross
