Please help
I am familiar with iterating through XML but need guidance transitioning to JSON.
I’m sure this is simple but I’ve looked all over the “Internets” only to find overly complicated examples. Please help me :
1.externally load a file named “myStuff.json” via jQuery Ajax get
2.Transverse through the document with jQuery grabbing all elements
3.display in an unordered list. I need it’s JSON equivalent
See Full code at…
https://bountify.co/R
MY XML: pullData2.xml
<objects>
<person>
<name>John</name>
<street>Oak Way</street>
<kids>
<kid1>
<kidName>Amber</kidName>
</kid1>
<kid2>
<kidName>Jessy</kidName>
</kid2>
</kids>
</person>
</objects>
MY jQuery:
$.get(‘pullData2.xml’, function(d){
$(‘#loadXML’).append(‘<dl id=“shufflePeople”/>’);
$(d).find(‘person’).each(function(){
var personName = $person.find(‘name’).text(); … ETC