use data.forEach(); instead of a for loop.