Hi! I have an object called Post on my DB, it has an attribute that is a pointer to other object called UserData, how can I access to that UserData’s attributes from the Post object? It appears empty.
Could you send an example of your code
Maybe this helps Unable to select attributes from a pointer
This one may be better: Logic of getting data from a Pointer in queries
And this is the UserData that it’s pointing on it’s attribute
Then when I try to call
console.log(post.attributes.userData.attributes.username)it says undefined, I’ve printed the UserData object and it exists but it’s empty
Thank you! I’ve seen that post but I haven’t been able to solve it in mine (as I already have the object and I’m not making a query)
How did you obtain the object then?
I mean, I obtained it from a query haha but it was a query from which I obtained many posts so I dont know how to retreive also the UserData from each one. So the only way to access the content of a pointer is retreiving it on the same query?
This is all I get from the pointer
You can post the original query, maybe you can specify there in select more info.
You may also be able to do another query with the id that this pointer has in order to get the object.