Jquery $.GET handling data -


I'm running a $. Receive a call to get the data from the Php file:

  $ .get ("test.php", {home_type: home_info [0], home_summy: home_info [1]}, function ( Data) {console.log (data);});  

and returns this data:

  [{"id": "1", "title": "aaa"}, {"id" I tried to use a primary mechanism to use this data:  
 "bbb"  $ Each (data, function (y, z) {console.log (y); console.log (z);});  

returns a number starting with y 1 and keeps counting and z data has every letter: (This is not what I was hoping for. What do I have to do To run foreach and use each item in one go.

  $. ("Test.php", {Home_type: home_info [0], home_community: home_info [1]}, function (response) {var data = JSON.parse (response); $ .each (data, function (index, value) {// every item with good Do ... console.log (index); console.log (value);}}});  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -