örnek:bu json dan songtitle (9 eleman) almak nasıl - ajax/jquery/javascript
{"currentlisteners":0,"peaklisteners":0,"maxlisteners":5,
"uniquelisteners":0,"averagetime":0,"servergenre":"Bollywood",
"servergenre2":"","servergenre3":"","servergenre4":"","servergenre5":"",
"serverurl":"http:\/\/www.website.in","servertitle":"RadioName",
"songtitle":"Udit Narayan - Bheed Mein - www.Songspk.name","dj":"encoder","songurl":"","streamhits":21514,"streamstatus":1,"backupstatus":0,"streamlisted":1,"streamsource":"203.xxx.xxx.xxx","streampath":"\/stream","streamuptime":0,"bitrate":"64","content":"audio\/mpeg","version":"2.4.7.256 (posix(linux x64))"}
new Request.JSONP({
url: 'http://ip:port/stats?sid=1&json=1',
onSuccess: function(response) {
show_response(response, $('post'));
}
}).send();
show_response = function(obj, result) {
$H(obj).each(function(v, k) {
new Element('div', {
html: v
}).inject(result);
});
};
<div class='wrapper'>
<div id='post'></div>
</div>
şey? V'nin değeri nedir? Ya da tüm nesnenin üzerinde yineleme yaparsanız - k == songtitle' –