I want to check if a string matches another string in an array of objects.
Here's my code
let myArr = [{title: "fruits"}, {title: "vegetables"}];
//I want to match a string with the 'title' of the objects
var str = "string";
if ( myArr[i].title == str) {
//Do something
}
letnotLet, and what is the value ofi?