Need help on the pagination on service portal

Munny1
Tera Expert

Hi @Ankur Bawiskar 

As per the below script  in the ticketlist .length we are getting as undefined. 

data.tickets.push(ticketList);  We are getting the object

 

Munny1_0-1690885005365.png

So my concern is how to find the length of the object in the widget?

1 REPLY 1

Kit Cheong
Giga Guru

 

I recommend you build "ticketList" as an array from the get go.

 

Object.entries(ticketList).length

 

More info: https://devdocs.io/javascript/global_objects/object/entries