I am trying to process a json version of a rss feed but I need to access an array labeled "data.channel.item". I suspect because this name seems to conflict with the reserved word item in javascript, the script doesn't work with only this particular json file. It does work in other cases.
Is there a way to use "item" but escape it somehow? (Yes, I'm a javascript newbie)
Here is the script (jquery)
<script>
$(document).ready(function(){
$.getJSON("http://example.com/jsonBuzz.php?callback=?",
function(data){
$.each(data.channel.item, function(i,item){
$("#results").append('<li><h1>'+item.title+'</h1></li>');
});
});
});
</script>
The abridged version of the json:
{"@attributes":{"version":"2.0"},"channel":{"lastBuildDate":"Mon, 11 Jan 2010... ..."generator":"Blogger","item":[{"guid":"tag:blogger.com,...