Your issue is listitems is 8. ( I am presuming this is what you are using to start your loop. as there is plenty of missing info)
The array starts at 0 and ends at 7
So in your first loop it cann ot read
msg.payload.data.listItems[8].oltId
as it does not exist.