I have such a problem that cypress cannot find the properties. In response I get array. I want to find record and get CustomMessage. :)
Do you notice where I am making a mistake:/ ?

Here is my code :)
cy.request({
method: 'GET',
url: 'url',
})
.then((resp) => resp.body)
.then((data) =>
data.find((element) => element['body']['Message']['Phone'] == phone)
)
.then((phone) => (otpCode = phone['body']['Message']['CustomMessage']))
Thanks for any help :)
