Json Write New Array Javascript Iteration