Consider the following:
let myArray = [
{
id: "3283267",
innerArray: ["434","6565","343","3665"]
},
{
id: "9747439",
innerArray: ["3434","38493","4308403840","34343"]
},
{
id: "0849374",
innerArray: ["343434","57575","389843","38493"]
}
];
If I want to search for the presence of the string "38493" in the innerArray of objects within myArray, and then create a new array containing the corresponding ids, it would look something like this:
let arrayWithIds = ["9747439", "0849374"];