Accessing nested data between brackets

I have some data passed to me as ‘data’ and when I do console.log(data.person) I see the returned structure as

Person {

Now, Person is part of “person” which is

Person {
first: ‘John’,
last: ‘Doe’
but when I do console.log(data.person.Person) I get an error of Person is undefined or possibly null if I’m misremembering. How do I access “first” value?

Syntax is important here. You should make sure you’re giving us exactly what you’re getting. What you’ve posted is not consistent between the 2 snippets and both would result in a parse error.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.