For Example: I have an array of object which consists 100 object in the array. and I want to show first 6 object in my react component. how do I loop that so it shows only those?
You can use slice to grab a range of elements and then map over it for your react component.
eg.
return
<div>
{elements.slice(0, 6).map((value) => <div>{value}</div>)}
</div>