Count array from fetch in js

Hi guys,i have another question about fuse, (i know i am pain in the a**) but only here somebody can help me.

I am getting some arrays thrue fetch, let say there is array called “slides”. I need to count how many elements are inside.

<Each Items="{data.slides}">
        <Text Value="{name}" />


I want to do it because i want to give unique name to each dockpanel.

Somebody can help ?

In JavaScript: data.slides.length

I got this message :

JS stack trace: TypeError: Cannot read property ‘length’ of undefined
at null._tempMethod (MainView.js:33:24)

Please show a whole code example for us to easily help you, its hard for us to help by guessing.

Show full ux and js of what you’ve tried to achieve. Full meaning only the relevant parts, not your whole project.