Preparing JSON Payload Schema for Visualisation
JSON Data Sources
supports two JSON formats – an array of objects, where each object is an unordered set of name/value pairs, and an array of arrays, where each sub-array contains ordered values. See the array of objects sample below:
https://www.flexmonster.com/doc/json-data-source/
https://www.flexmonster.com/doc/data-types-in-json/
Example (for dates)
https://jsfiddle.net/flexmonster/nj9cfhzL/
Array of Objects
[
{
"Color" : "green",
"Country" : "Canada",
"State" : "Ontario",
"City" : "Toronto",
"Price" : 174,
"Quantity" : 22
},
{
"Color" : "red",
"Country" : "USA",
"State" : "California",
"City" : "Los Angeles",
"Price" : 166,
"Quantity" : 19
}
]
Array of Arrays
[
[
"Category",
"Color",
"Price",
Quantity"
],
["Ice-cream", "red", 23.32, 4],
["Ice-cream", "yellow", 4.2, 3],
["Sweets", "red", 45.3, 2],
["Candies", "orange", 22.65, 7]
]
Updated on: 12/02/2022
Thank you!