Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Below: a JSON with one variable and one value. Most common case
- {
- "variables": [
- {
- "title": "wave",
- "displayed_title": "wave",
- "values": [
- {
- "value": "2019_CBT_US_Q2_W08",
- "displayed_value": "Wave 8 of 2019"
- }
- ]
- }
- ]
- }
- // Below: a JSON with 2 different values for the same variable
- {
- "variables": [
- {
- "title": "wave",
- "displayed_title": "wave",
- "values": [
- {
- "value": "2019_CBT_US_Q2_W08",
- "displayed_value": "Wave 8 of 2019"
- },
- {
- "value": "2019_CBT_US_Q1_W05",
- "displayed_value": "Wave 5 of 2019"
- }
- ]
- }
- ]
- }
- // Below: a JSON with 2 different variables having their own values
- [
- {
- "variables": [
- {
- "title": "wave_id",
- "displayed_title": "Wave",
- "values": [
- {
- "value": "VAL",
- "displayed_value": "Displayed value"
- }
- ]
- },
- {
- "title": "City-tier_id",
- "displayed_title": "City-tier",
- "values": [
- {
- "value": "VAL",
- "displayed_value": "citytierxyz"
- }
- ]
- }
- ]
- }
- ]
- // Below: a complex JSON mixing the difficulties
- {
- "variables": [
- {
- "title": "wave",
- "displayed_title": "wave",
- "values": [
- {
- "value": "2019_CBT_US_Q2_W08",
- "displayed_value": "Wave 8 of 2019"
- },
- {
- "value": "2019_CBT_US_Q2_W09",
- "displayed_value": "Wave 9 of 2019"
- },
- {
- "value": "2019_CBT_US_Q2_W10",
- "displayed_value": "Wave 10 of 2019"
- },
- {
- "value": "2019_CBT_US_Q3_W12",
- "displayed_value": "Wave 12 of 2019"
- }
- ]
- },
- {
- "title": "City-tier",
- "displayed_title": "City-tier",
- "values": [
- {
- "value": "citytier_abc",
- "displayed_value": "citytier 1"
- },
- {
- "value": "citytier_xyz",
- "displayed_value": "citytier 2"
- }
- ]
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement