you are looking up length every time:

for (var i = 0, len = result.data.length; i < len; ++i) {