How do I iterate through this JSON object in jQuery?

后端 未结 4 2134
自闭症患者
自闭症患者 2020-12-07 22:53

I have a JSON object which is generated by PHP. It\'s an object with a set of dates. It has the timeStamp and then a formatted version of the date. How would I iterate throu

4条回答
  •  生来不讨喜
    2020-12-07 23:05

    jQuery.each() is probably the easiest way, check this out: http://api.jquery.com/jQuery.each/

    eg

    $.each(dates, function(index, date) { alert(date.timeStamp); });
    

提交回复
热议问题