How do I sort an array of objects based on a single attribute

I have an array of cryptocurrencies and I want to sort them based on the attribute market_cap_rank:

This is the structure of the objects in the array:

{
current_price: 5.39533e-7
id: "bitecoin"
image: "https://assets.coingecko.com/coins/images/22571/large/logo200.png?1642080037"
last_updated: at {seconds: 1644321837, nanoseconds: 961000000}
market_cap: 0
market_cap_rank: null
name: "Bitecoin"
price_change_percentage_24h: -1.99253
symbol: "$BITC"
}

I need to sort an array of these objects based on the market cap rank.