How can I transform an object into an array and iterate through each item?
Here is the object I have:
let obj = {
each_hour: "20000",
edit_photo: { yes: "20000", no: "0" },
photo_type: { Personal: "1000", sport: "2100", Industrial: "1200", Commercial: "2300", Fashion: "1300", mode: { "name": "farhad" } },
photograph_gender: { male: "0", female: "20000" }
}
Desired output:
each_hour
20000
edit_photo
yes
20000
no
0
photo_type
Personal
1000
sport
2100
Industrial
1200
...