I have a class with a model like this:
model = new questions(
1, // Id
'', // Name
'', // LastName
'undefined', // Gender
'undefined', // Filling Status
...
)
The I have a service that makes a GET request to an API, and the response is like this:
{
"id": "5b6f",
"name": "John",
"lastName": "Doe",
"gender": "Male",
"fillingStatus": "Single",
...
}
How can I populate the model with this response, should I iterate to the object?
Thanks for your help!