How to random each loop item and on ajax / json data in jquery ?
data.json
{
  "items" : [
    {
      "title" : "new1",
      "content" : "content1"
    },
    {
      "title" : "new2",
      "content" : "content2"
    },
    {
      "title" : "new3",
      "content" : "content3"
    },
    {
      "title" : "new4",
      "content" : "content4"
    }
  ]
}
jquery ajax get json
    $.ajax({
        url: 'data.json',
        type: 'get',
        dataType: 'json',
        async: false,
        success: function(data){
              $.each(data.items, function(index,item) {
               var template = '<p>' + item.title + '</p>' + item.content + '<br />'; 
                  $('html').append(template);
                  return index < 1 ; // set 2 item 
              });
        }
     });
How to random each loop item and on ajax / json data in jquery ?
 
    