<!DOCTYPE html>
<html>
<script>
function print_r(theObj){
if(theObj.constructor == Array || theObj.constructor == Object){
document.write("<ul>")
for(var p in theObj){
if(theObj[p].constructor == Array || theObj[p].constructor == Object){
document.write("<li>["+p+"] => "+typeof(theObj)+"</li>");
document.write("<ul>")
print_r(theObj[p]);
document.write("</ul>")
} else {
document.write("<li>["+p+"] => "+theObj[p]+"</li>");
}
}
document.write("</ul>")
}
}
var jlkb = {"slots":{"Thursday":{"duration":"75","slots":[[{"from":"07:35 AM","to":"08:35 AM","data_from_row":3,"data_to_row":7,"data_column":"5"}],[{"from":"08:50 AM","to":"09:50 AM","data_from_row":8,"data_to_row":12,"data_column":"5"}],[{"from":"10:05 AM","to":"11:05 AM","data_from_row":13,"data_to_row":17,"data_column":"5"}],[{"from":"11:20 AM","to":"12:20 PM","data_from_row":18,"data_to_row":22,"data_column":"5"}]]},"Friday":{"duration":"45","slots":[[{"from":"07:05 AM","to":"07:35 AM","data_from_row":1,"data_to_row":3,"data_column":"6"}],[{"from":"07:50 AM","to":"08:20 AM","data_from_row":4,"data_to_row":6,"data_column":"6"}],[{"from":"08:35 AM","to":"09:05 AM","data_from_row":7,"data_to_row":9,"data_column":"6"}]]}}};
print_r(jlkb);
</script>
<body>
The content of the body element is displayed in your browser.
</body>
</html>
<html>
<script>
function print_r(theObj){
if(theObj.constructor == Array || theObj.constructor == Object){
document.write("<ul>")
for(var p in theObj){
if(theObj[p].constructor == Array || theObj[p].constructor == Object){
document.write("<li>["+p+"] => "+typeof(theObj)+"</li>");
document.write("<ul>")
print_r(theObj[p]);
document.write("</ul>")
} else {
document.write("<li>["+p+"] => "+theObj[p]+"</li>");
}
}
document.write("</ul>")
}
}
var jlkb = {"slots":{"Thursday":{"duration":"75","slots":[[{"from":"07:35 AM","to":"08:35 AM","data_from_row":3,"data_to_row":7,"data_column":"5"}],[{"from":"08:50 AM","to":"09:50 AM","data_from_row":8,"data_to_row":12,"data_column":"5"}],[{"from":"10:05 AM","to":"11:05 AM","data_from_row":13,"data_to_row":17,"data_column":"5"}],[{"from":"11:20 AM","to":"12:20 PM","data_from_row":18,"data_to_row":22,"data_column":"5"}]]},"Friday":{"duration":"45","slots":[[{"from":"07:05 AM","to":"07:35 AM","data_from_row":1,"data_to_row":3,"data_column":"6"}],[{"from":"07:50 AM","to":"08:20 AM","data_from_row":4,"data_to_row":6,"data_column":"6"}],[{"from":"08:35 AM","to":"09:05 AM","data_from_row":7,"data_to_row":9,"data_column":"6"}]]}}};
print_r(jlkb);
</script>
<body>
The content of the body element is displayed in your browser.
</body>
</html>
0 comments:
Post a Comment