Monday, 12 August 2013

How to parse the JSON Date format from the below given json data using jquery?

How to parse the JSON Date format from the below given json data using
jquery?

{
"2013\/02\/05":[
{"id":"84eb13cfed01764d9c401219faa56d53","colour":"#000000","category":"custom"}
],
}
I have used the jquery code given below.I am trying to access the date
'2013/02/05' and the array elements like id ,colour and category of that
date.
$(document).ready(function(){
var output = $("#changeBtn");
$("#data").click(function(){
$.getJSON("json_data.json",function(jd){
var dates = jd.date;
alert(dates);
});
});

No comments:

Post a Comment