How to get one entry's related stuff in Vuejs component For example, in a vuejs component, i send a ajax request to get an article. And in this article, there is a relation field called relatedTopics. 

How can I get this article's relatedTopics with something like article.relatedTopics?
So your AJAX request likely hit an Element API or GraphQL endpoint, which would return the data to you as JSON.

What exactly that endpoint returns is totally up to the endpoint, but realize that it's not a PHP/Twig object that gets returned. It's a JSON-ified representation of it.

So for you to get the article.relatedTopics either the endpoint would need to have resolved the .relatedTopics and return them as JSON, or it could return an id or other information that you could use in another AJAX request to return that data.

More reading:


Lazy Loading with the Element API &amp; VueJS
Autocomplete Search with the Element API &amp; VueJS
Using VueJS + GraphQL to make Practical Magic