multiple values in JSON

1
hi does anyone know how to setup the a JSON structure such that it can take in more than just one value?  for example, in the colorscale, it requires 2 values, one for the range, and one for color, right now, when i setup JSON structure and try to export, it will only allow me to insert one value.  (tried inserted both as a text, but it doesn’t work as it put a quotation in the entire text)  "colorscale": [       [         0,   "#ee4b2b"       ],       [         0.5,  "#ffea00"       ],       [         1,  "#32cd32"       ]     ],     "z": [
asked
1 answers
0

It looks like you are trying to use an array to store an object and using an attribute key as value. Try using a structure like this instead…

 

{
	"colorscale": [
		{
			"range": 1,
			"color": "#ee4b2b"
		},
		{
			"range": 0.5,
			"color": "#ffea00"
		},
		{
			"range": 1,
			"color": "#32cd32"
		}
	]
}

Hope this helps

answered