Reputation: 7
Trying to find the "age" based on the "name" of the below XML data.
<data>
<user>
<name>Joe</name>
<age>34</age>
</user>
<user>
<name>Jimmy</name>
<age>26</age>
</user>
</data>
I used xml2json to parse this, returning
{"data":{"user":[{"name":"Joe","age":"34"},{"name":"Jimmy","age":"26"}]}}
With this, how would I be able to get the value 34 by entering in "Joe"?
Upvotes: 0
Views: 95