Postman test to assert the first array in response contains a value

I’m trying to write a postman test to verify for notificationTypeId 58 contains “False” for optOutEmail and optOutAlert. Can someone help me with how to achieve this? Example response below…
[
{
“notificationTypeId”: 58,
“notificationType”: “Dispensation - Request for Information”,
“optOutEmail”: false,
“optOutAlert”: false,
“canOptOutEmail”: true,
“canOptOutAlert”: true
},
{
“notificationTypeId”: 20,
“notificationType”: “Dispensation - Requested”,
“optOutEmail”: false,
“optOutAlert”: false,
“canOptOutEmail”: true,
“canOptOutAlert”: false
},
{
“notificationTypeId”: 69,
“notificationType”: “Notification Defer - Expiration Notice”,
“optOutEmail”: true,
“optOutAlert”: false,
“canOptOutEmail”: true,
“canOptOutAlert”: false
},

Something like this, perhaps?

pm.test("verify first entry opts out", function() {
  data = pm.response.json()
  pm.expect(!data[0].optOutEmail && !data[0].optOutAlert).to.equal(true)
});

This should check the first object in the array (data[0]) to have the optOutEmail and optOutAlert attributes to evaluate to “falsey” values.

I’d probably do more thorough checking, though, like making sure the object even has those attributes etc