I am trying to return the first object of an array, how do I achieve this.
{ products && products.map((product,i)=>(
<div key={i} >
<h6>{product.name} - {product.category.name}</h6>
<p className="mb-0"> {product.price} returns in {product.duration} months</p>
</div>
))
}