Can you tell us what exactly you are trying to do? What functionality to add?
I do have a json file with different categories like Automotive, Hotels and others.
On one screen all those categories are already listed. Depending what one is choosing from this list, I want to display the result (all hotels or all car garages...) in a new screen. How can I change the content from the new screen from hotels to garages? I thought I can store the choice from the first screen in a variable and pass it over to the new screen to bind the result to the list.
Saw an example in the docs which was working with rest requests, but I do have only the response from the rest service.
So, the entire response (all categories) you get in the initial request?
You could save the entire JSON response in local storage and then pick the category that you need on the next page.
please, can you specify 'picking the category'. Do I have to use some jacascript for that?
Here is a simpler way to do this.
You can define a separate service for each category. Service input would be the same for all. Service output would be different. For example, if you need to display the Virtual Tour category, the service response would be this:
code
Geocockpit
__Virtual Tour
/code
(the __ is added for formatting)
For a service that shows the Popular Sites category, the response would be:
code
Geocockpit
__Virtual Sites
/code
and so on. As the service output doesn't have any other categories, those will be basically "dropped".
Every page would hold one category and use one service.
HI Max,
unfortunately it's not working that way. Will read the categories by jquery from the JSON file and put the results manually into the list.
Thanks for your help.
You would still read the entire response each time but on the response side, you will only return the required category.