Thanks for the explanation, Jeremy!
Thanks for clarifying, Jeremy! Understood how get() works
The logic left to figure out is building an object like cs in your example where if I have two arrays like;
a = [ 1,2,3,4,5] b = [1,2,3,4,5]
How do I create an object like this;
0: Array 
1: Array 
Any clues anyone?
What are a and b in your example?
Thanks for asking,
They are two arrays I had to create from the JSON data where the values from the respective column (example above) had to be mapped along y axis to the height of the canvas.
Hope that made sense? Happy to elaborate.
When you look at lines 33,34,35 in Jeremys code you see he is filling the array cs with 8 values. Here you want to use your 2 arrays as source for the values
Right. You can cs.push(anything). Your anything could be:
- a line, [x1,y2,x2,y2]
- a centered circle, represented only by its radius 
- a bezier curve, [0,1,2,3,4,5,6,7]
- your json data [[0,1,2,3,4],[5,6,7,8,9]]
- an class object, like a paper doll
The only thing that matters is that the data can be used
- by makePicker to mark the thing on the map
- by draw to render the thing on the canvas
…but it can be anything. No matter what it is, any ccols colored pixels on the pg map refer to the cs object. When you are drawing cs – whatever it contains – you check the mouse location on the map (pg) for color ccols. If that appears under the mouse, bam. Your mouse is over cs.
Hi Chrisir, the 8 values are arguments for each curve, while there are 6 curves in total.
Since I have 2 Arrays a & b with values already in them, I’m just pushing it twice.
I was wondering whether there was a loop that I could code but I don’t think so.
That makes total sense. Thank you for clarifying! Appreciated Jeremy.
Been testing and trying it out, the logic is pretty sharp, nice one.
Will ping back when I run into other Qs