Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Caleb Hasch](https://secure.gravatar.com/avatar/6319e0d0e9258203d49229176279afda?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Caleb Hasch
Full Stack JavaScript Techdegree Graduate 16,351 PointsThe director only returns "[object]"
So I have my people alias set up just like in the example, but all I'm getting back for Brad is
{
id: 1,
firstName: 'Brad',
lastName: 'Bird',
director: [ [Object], [Object] ]
},
Why is it like that and how do I get the actual movie objects to show?
1 Answer
![Lee Vaughn](https://uploads.teamtreehouse.com/production/profile-photos/9205552/micro_lee.jpg)
Lee Vaughn
Treehouse TeacherHey Caleb!
When you are retrieving and logging out people
are you using console.log(people.map(person => person.get({ plain: true })));
or console.log(JSON.stringify(people, null, 2));
? The first option typically returns [ [Object], [Object] ]
as you are describing but the second option should log out:
director": [
{
"id": 2,
"title": "The Incredibles",
"releaseYear": 2004,
"directorPersonId": 1
},
{
"id": 1,
"title": "The Iron Giant",
"releaseYear": 1999,
"directorPersonId": 1
}
]
If you continue to run into trouble go ahead and share a link to your code and we can dig a little deeper.
PS: Since you are in the FSJS Techdegree you should consider reaching out in Slack with questions like these. You can find a link to Slack on the right side of the Home page.