Page 1 of 1

Populate RESTservice JSON result into model local storage

Posted: Mon Jul 27, 2015 8:01 am
by David7661654

Hello,

I have a web-service that returns a user's allowed groups, where each group contains the group id, the group name and the relevant services linked to that group. The services themselves contain their ids and their names.

Each user can have a different number of groups and each group can have a different number of services in it.

It looks like this:
Image

I created 2 models (hopefully, they are correctly formatted):
Image

How do I configure the RESTservice response to load the result of the webservice into locaStorage variables that are defined as these models?
Image

Thanks,

David


Populate RESTservice JSON result into model local storage

Posted: Fri Jul 31, 2015 4:51 pm
by Pavel Zarudniy

Hi David,
As i see yours models should looks like this -
Image