Helper function to set the values of an empty array
function set(to, from) { for (var k in from) { if (from.hasOwnProperty(k)) to[k] = from[k]; } }