seems like an easy question but I can’t get this. I have a property I’m trying to access using console.log in javascript. If I do console.log(intersects) – I get the object, with a list of all of its properties. One of them is object, and it has a child property of name “s2” – that’s the property I want to be able to access in my log statement. But if I try:
console.log(intersects.object.name) – I get undefined. I’ve attached a screenshot from the inspector in Chrome. Any idea how to access this?
It looks like
intersectsis actually an array of objects; tryintersects[0].object.name.(You can tell by the square brackets around the parent Object in the inspector.)