I've got this map that I'd like to sort by "id" value:
{products.map(({ id, headline }) => (
<Container>
<Row key={id}>
<Col>
<p>id={id}</p>
<p>headline={headline}</p>
</Col>
</Row>
</Container>
))}
How would I do this?
id
?.map
you can do.sort
id
of a product is a number or a string?