I have a JavaScript object array. When write console.log(myarry) it will show in the console in the below form.
console.log(myarry)
Array[2] 0: Object one: \"one\"
you can do it in this way
const a = [{ one: 'one' }, { two: 'two' }]; a.forEach(function(value,key) { console.log(value,key); });
You can take key and value in a variable and use them.