Hi there,
I am new to jQuery and could not get the JSON data. Can anyone help me please. Thank you.
for example, I would like to get and use data from array bidround2: state
-------------------------
hand1.html file conaining JSON data:
{
"bidround1":[
{
"state":"cont",
"bidw":"u",
"bidn":"1",
"bide":"1",
"bids":"dbl",
"alertw":"a"
}
]
"bidround2":[
{
"state":"cont2",
"bidw":"u2",
"bidn":"12",
"bide":"12",
"bids":"dbl2",
"alertw":"b2"
}
]
}
-----------------------
jQuery codes:
$(document).ready(function(){
$('#pass').click(process);
});
function process()
{
$('#alerts > p').html('alınıyor...');
$.getJSON('hand1.html?rid='+Math.random(), function(data){
$('#alerts > p, #commentbox > p').empty();
$('#alerts > p')
.append(data.state[1] +'<br />');
});
}