Correct arrays to function properly with json response