I have an array of objects with the following format. Each object has got few properties and also an array. I have to fetch a property if a key is present in the array.
Consider the below object: When I give key as 7 it should return me 'xyz'. If key is 3 it should give me 'abc'
[
{
val : 'abc',
arr : [1,2,3,4]
},
{
val: 'xyz',
arr : [7,8,9]
}
]
arrcontains 7 as well?