Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. // Below: a JSON with one variable and one value. Most common case
  2. {
  3. "variables": [
  4. {
  5. "title": "wave",
  6. "displayed_title": "wave",
  7. "values": [
  8. {
  9. "value": "2019_CBT_US_Q2_W08",
  10. "displayed_value": "Wave 8 of 2019"
  11. }
  12. ]
  13. }
  14. ]
  15. }
  16.  
  17.  
  18. // Below: a JSON with 2 different values for the same variable
  19. {
  20. "variables": [
  21. {
  22. "title": "wave",
  23. "displayed_title": "wave",
  24. "values": [
  25. {
  26. "value": "2019_CBT_US_Q2_W08",
  27. "displayed_value": "Wave 8 of 2019"
  28. },
  29. {
  30. "value": "2019_CBT_US_Q1_W05",
  31. "displayed_value": "Wave 5 of 2019"
  32. }
  33. ]
  34. }
  35. ]
  36. }
  37.  
  38.  
  39. // Below: a JSON with 2 different variables having their own values
  40. [
  41. {
  42. "variables": [
  43. {
  44. "title": "wave_id",
  45. "displayed_title": "Wave",
  46. "values": [
  47. {
  48. "value": "VAL",
  49. "displayed_value": "Displayed value"
  50. }
  51. ]
  52. },
  53. {
  54. "title": "City-tier_id",
  55. "displayed_title": "City-tier",
  56. "values": [
  57. {
  58. "value": "VAL",
  59. "displayed_value": "citytierxyz"
  60. }
  61. ]
  62. }
  63. ]
  64. }
  65. ]
  66.  
  67.  
  68. // Below: a complex JSON mixing the difficulties
  69. {
  70. "variables": [
  71. {
  72. "title": "wave",
  73. "displayed_title": "wave",
  74. "values": [
  75. {
  76. "value": "2019_CBT_US_Q2_W08",
  77. "displayed_value": "Wave 8 of 2019"
  78. },
  79. {
  80. "value": "2019_CBT_US_Q2_W09",
  81. "displayed_value": "Wave 9 of 2019"
  82. },
  83. {
  84. "value": "2019_CBT_US_Q2_W10",
  85. "displayed_value": "Wave 10 of 2019"
  86. },
  87. {
  88. "value": "2019_CBT_US_Q3_W12",
  89. "displayed_value": "Wave 12 of 2019"
  90. }
  91. ]
  92. },
  93. {
  94. "title": "City-tier",
  95. "displayed_title": "City-tier",
  96. "values": [
  97. {
  98. "value": "citytier_abc",
  99. "displayed_value": "citytier 1"
  100. },
  101. {
  102. "value": "citytier_xyz",
  103. "displayed_value": "citytier 2"
  104. }
  105. ]
  106. }
  107. ]
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement