building/modifying JSON with javascript