For example I have such an object:
var a = {
'light': 'good',
'dark' : {
'black': 'bad',
'gray' : 'not so bad'
}
}
and such a code:
var test = function(obj) {
// do smth with object
// I need to get obj's name ('dark' in my way)
}
test(a.dark);
How to get name of object in function's body. So I mean I should know that obj's name is 'dark'.
I've tried inspect object with firebug, but it's only show object's property. It's not showing some internal methods or properties, with which I'll be able to know
Thank you.