asifnoor
Kilo Patron

Hi,

The error is in line no. 115. The payload seems to be a string and not a object. When you are trying to use payload.items.length, it is not able to parse this and hence you are getting an error. Check the value of payload and see that you are passing the object. Try to json.stringify and then json.parse in the function before using it.

 

Mark the comment as a correct answer and helpful if this has answered your question.