1const data = await response.json();
2
3data.forEach(obj => {
4 Object.entries(obj).forEach(([key, value]) => {
5 console.log(`${key} ${value}`);
6 });
7 console.log('-------------------');
8});
1var arr = [ "one", "two", "three", "four", "five" ];
2var obj = { one:1, two:2, three:3, four:4, five:5 };
3
4jQuery.each(arr, function() {
5 $("#" + this).text("My id is " + this + ".");
6 return (this != "four"); // will stop running to skip "five"
7});
8
9jQuery.each(obj, function(i, val) {
10 $("#" + i).append(document.createTextNode(" - " + val));
11});