how to access object data within object

I have this:

const paymentIntents = await stripe.paymentIntents.list({
    stripeAccount: stripe_account
});

and it returns:

object: 'list',
  data: [
    {
      id: 'pi_...',
      object: 'payment_intent',
      amount: 2500,

now I have two problems. 1. I need to access amount. and 2. there is going to be dozens of records being returned, so I need to loop through all the results and actually add up the amounts. here’s what I’ve tried so far:

console.log(paymentIntents.amount)
console.log(paymentIntents.data.amount)

neither of those worked. and i wouldn’t even know how to loop thorugh all those results. How can i do this?