How to get first N number of elements from an array How to get first N number of elements from an array reactjs reactjs