1. $.ajax({
  2.         type: 'GET',
  3.         url: 'hobby_search.php',
  4.         data: { term: txt },
  5.         dataType: 'json', // Choosing a JSON datatype
  6.          success: function(data) {
  7.                 var JSONArray = $.parseJSON( data );
  8.                 console.log(JSONArray);
  9.             },
  10.         error: function() {alert("Error. Try later.");}
  11.     });