No. There is no way of knowing which object it came from.
s
and obj.subObj
both simply have references to the same object.
You could also do:
var obj = { subObj: {foo: 'hello world'} };
var obj2 = {};
obj2.subObj = obj.subObj;
var s = obj.subObj;
You now have three references, obj.subObj
, obj2.subObj
, and s
, to the same object. None of them is special.