How to convert javascript object from api call to frontend model


I get a js object from an API call (not my API), and I want to convert it to an object on the frontend.
I saw a reference to this subject in one of the lessons but can’t remember which lesson it was.

Can someone direct me to the right lesson?
What are the best practices? Is it should be a service?
Where should I put this piece of code?

Hey, what you receive from the APIs is usually a javascript object already. But if you are receiving a json object, then you can use JSON.parse() to convert it to a javascript object.