For some reason this statement is skipping some data.Am I missing a continue statement somewhere or something ? Here is the code
for (var i = 0, len = data.ORDER
you are using "i" in your outer an inner loops. you need to use a different variable in the inner loop: i have used "inner" below as and example.
for (var i = 0, len=data.ORDER_STATUS[0].ORDERS.length; i < len; i++) {
if (data.ORDER_STATUS[0].ORDERS[i].SEC_TYPE=="MLEG"){
for (var inner = 0; inner < data.ORDER_STATUS[0].ORDERS[i].LEGS.length; inner ++) {
// do something
}
}
}