How can i use .each() function to parse json data using jquery that comes from the server which encode using php json_encode | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i use .each() function to parse json data using jquery that comes from the server which encode using php json_encode

i cant parse using .each method but still am getting the data when in use consol.log() method i see the data in the browser inspect mode but when i use .each() error occur which says can not use "in " operator. plz help me. i use jquery ajax get function to send request to the server

27th Oct 2017, 11:11 PM
Amanuel Tadesse
Amanuel Tadesse - avatar
2 Answers
+ 2
// jsonData => data from the server Object.keys(jsonData).forEach( function(key) { console.log(key); console.log(jsonData[key]); }); // hope this is what you are looking for
27th Oct 2017, 11:22 PM
Mohamed Salem Gzizou
Mohamed Salem Gzizou - avatar
+ 1
$each(data, function(i,item){ order.id}
7th Nov 2017, 11:06 PM
Amanuel Tadesse
Amanuel Tadesse - avatar