So i have this:
const somObj = {
whatever : 1,
}
const somObj2 = {
whatever : 2,
}
const arrayOfObj = [somObj, somObj2]
Is there any way to get the name of the objects as strings while looping for the array like this?
for (i in arrayOfObj){
something(arrayOfObj[i])
}
being the return the string "somObj".
thank you