Object foreach is not a function

how to foreach object in ionic 3? because I get an error message like this “Object foreach is not a function”.
this my code,

let kursiss = {9C: "", 9D: "1"};
kursiss.forEach((key, value) => {
    this.list_kursi_dipesan += value=="1"?key+',':'';

you don’t loop an object with for each.

probably that can help: https://stackoverflow.com/questions/921789/how-to-loop-through-a-plain-javascript-object-with-the-objects-as-members

You can’t loop on an object. But you can loop over object.keys().

must declare properly the object


let kursiss = [{ key: 9C , value: ""},{ key: 9D, value: ""}];

for(let _obj of kursiss)
 console.log("value ->",_obj.key);