私のjsonデータはこの
[{"id":"299","calendar_id":"49","event_date":"2012-11-27","event_start":"2012-11-27 00:39:00","event_end":"2012-11-27 00:39:00","title":"description goes here","description":"","planned":"0","type_class":"General","type_data":"{\"frequency_type\":\"1\",\"frequency_x\":null,\"type\":\"14\",\"status\":\"23\"}"
Ajaxリクエストのように見えます
$.ajax({
url: "<?php echo $this->createUrl('path/to/file')?>",
dataType: 'json',
cache: false,
success: function(data) {
var out = "<span>";
$(data).each(function(){
out += this.title;
});
out += "</span>";
unplannedList.html(out);
}
var unplannedList = $('.col ul li');
上部に表示されているデータを追加する必要があるリストです。「this」または「data」は機能しません。貼り付けたアラートからデータを取得する正しい方法は何ですか。