I am dealing with the following data structure:
var myValues = {
55bdf7bda89de40349854077: ["hello"]
55be0c77a89de403498540bc: ["goodbye"]
55be0e22a89de403498540c1: ["hey there!"]
}
Also, I have a variable that holds an id:
var id = '55be0e22a89de403498540c1';
My objective is to search for this id in the object and retrieve the corresponding value from the array.
I attempted to locate it using:
myValues.id[0]
However, this approach did not yield the desired outcome.
Is there anyone who can assist me with this issue?