This post is hidden. You deleted this post 6 mins ago. I have data stored in SQL server in XML format. The query returns:
<row foo1="foo11" foo2="foo12" foo3="foo13" />
<row foo1="foo21" foo2="foo22" foo3="foo23" />
<row foo1="foo31" foo2="foo32" foo3="foo33" />
I need to convert it to a array of objects on Javascript.
[{foo1: 'foo11', foo2: 'foo12', foo3:'foo13'},
{foo1: 'foo21', foo2: 'foo22', foo3:'foo23'},
{foo1: 'foo31', foo2: 'foo32', foo3:'foo33'}].
I tried to use xml2js, and XML Parser both only returning first row and not in a format i need.