Checking the values of JSON response in React Native
I would join the array and than call include.


const data = {
    id: 12,
    message: ["1 bonus point!", "Congratulations", "You have leveled up!"]
}

const containTerm = data.json().message.join().includes('Congratulations')

console.log('Is term in array',  containTerm)




I would like to display either one of two images in a modal based on an API response...unfortunately, the API returns a long string array. I need to be able to determine if the word "Congratulations" is in this array. So far, I've tried a couple basic things:
Here is an example API response:
{
    id: 12,
    message: ["1 bonus point!", "Congratulations", "You have leveled up!"]
}


   console.log(response) // the full response prints to the console, no problem
   console.log(response?.message) //undefined
   console.log(reponse.message) //undefined
   console.log(response["message"]) //undefined

I want to be able to do something like this:
setSuccess(response["message"].contains("Congratulations"))
I'm sure it will be some small syntax thing, but I'm been banging my head against the wall. Any help is appreciated, let me know what I should try!
