$.each with afm object counts length prop as value.

When use $.each with afm object, each loop counts one more value, this value is the length of the object.

Checking key == "length" the problem is solved.