Data fetching issues?

Hi guys, doing a small e-commerce app, wanted to output the total number of products, the expected result is 12, but on output I got 2, which confused me. I checked on the test page via console.log and the total number of products is 12, I still can't figure out what is wrong

First pic is length 2 for some reason (12 is expected)
Second pic shows the code I ran to test
The third pic is the output
image.png
cDlIjAMn924.png
7c_u28QTG9M.png
Was this page helpful?