JavaScript sum on property in the sub collection of array of objects

I have an array of objects which each may have collection of transactions i need to extract two values of the array

  • sum value of all objects
  • sum amount of all transactions

    [
    {
    "id": "1",
    "value": 2343,
    "transactions": [
    {
    "id": 88,
    "amount": 34,
    },
    {
    "id": 89,
    "amount": 111,
    }
    ]
    },
    {
    "id": "2",
    "value": 345,
    "transactions": [
    {
    "id": 90,
    "amount": 44,
    },
    {
    "id": 91,
    "amount": 112,
    }
    ]
    }
    ]

the first one I achieve by

objects.reduce((acc, transaction) => acc + transaction.value, 0);

but the second one is too difficult for me to achieve; do i loop and reduce each object?

JavaScript sum on property in the sub collection of array of objects