Can't return object property when it is shown in the object
Answered
American black bear posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
American black bearOP
I have a client component that posts data to an api onClick and awaits for response upon api request to update the State. I have done a console log of the 'post' object and it looks like the object is successfully set but when i logged the post.photo, it returns undefined even though we do have a photo in the post. Would you know what is the issue?
![Image](https://cdn.discordapp.com/attachments/1149388661276815501/1149388661486526535/image.png)
![Image](https://cdn.discordapp.com/attachments/1149388661276815501/1149388661746585701/image.png)
2 Replies
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
Pretty sure it is post.post.photo
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
American black bearOP
Thank you kind sir, you just saved me hours of endless troubleshooting