I was using Myjson.slice(1, 20).
I need only 20 items from Myjson which has a length of 2624 and in this code I tried to you slice like this but I don't know what to do to make the difference between xxx and yyy to 20:
let xxx = Math.floor(Math.random() * 2624 + 1);
let yyy = Math.floor(Math.random() * 2624 + 1);
{Myjson.slice(xxx, yyy).map((item) => (
<Link
href={item.ud}
key={item.id}
>
{item.test}
</Link>
))}
How can I get 20 random items from this JSON?