Q:

Add JSON results to HTML

I have this JSON file with Currency Rates:
http://openexchangerates.org/latest.json

Can someone help me with a jQuery script so the results will look like:
<div class="currency">USD</div><div class="value">1.000</div>
<script type="text/javascript">

   $(document).ready(function() {
    var url =  "http://openexchangerates.org/latest.json";
    $.getJSON(url + "?callback=?", null,function(data) {

       // ADD CODE HERE

    });
    });

</script>

A:

Assuming you want to loop through all of those rates.... you'll want to do something around the lines of this.
<script type="text/javascript"> 

   $(document).ready(function() { 
    var url =  "http://openexchangerates.org/latest.json"; 
    $.getJSON(url + "?callback=?", null,function(data) { 
       var myElementToAppendTo = $("#myElement");  // Note: add whatever element you are putting this into here
       $.each(data.rates, function(key, value) {
         if(key == "EUR" || key == "USD" || key == "GBP") {
           myElementToAppendTo.append("<div class='currency'>" + key + "</div><div class='value'>" + value + "</div>");
         }
       }

    }); 
   }); 

</script> 

