I'm trying to return the view data and display it in a list for verification.
It is sending for the data and seems to receive it (I get a 200), but it is not outputting the data.
Any help much appreciated!
<div id="ajax"></div>
<script type="text/javascript">
$(document).ready(function(){
$.getJSON('/views/ajax?view_name=latest_new&view_display_id=page_1&view_args=city', function(data) {
var items = [];
$.each(data.items, function(i, item) {
items.push('<li id="' + i + '">' + item + '</li>');
});
$('<ul/>', {
'class': 'my-new-list',
html: items.join('')
}).appendTo('#ajax');
});
});
</script>