for loop JSON array write to browser