I have a comma-separated list that looks like this:
var arr = [1,2,3,4]
and I want to transform it into the following format:
var new_arr = [
{x:1, y:2},
{x:3, y:4}
]
I'm having trouble figuring out how to achieve this key/value transformation.