When using JSON, it's very common to return a collection or set of data. In order to display the data the following components can be used: - Grid
- List
- Collapsible Block
- Radio button (will create a group)
- Check box
- Select (Select menu)
Tip: To make it easier to map, always rename these components.
Let's say we get a results [...] collection in JSON. To keep things very simple, we are going to use the Twitter response but only with two parameters (the others were deleted for simplicity).
GridMapping to a grid looks like this:
ListMapping to a list looks like this:
Collapsible blockWith Collapsible Block you can map to its header without using any other component:
You may also put any other components inside the header and map in similar fashion:
Radio buttonRadio button mapping looks like this:
You may also place other components such as Label inside the Radio button and map to it. Check boxCheck box mapping looks like this:
You may also place other components such as Label inside the Radio button and map to it.
Select (Select menu)Select mapping looks like this:
|