Given the following:
var myArray = [ { id: "3283267", innerArray: ["434","6565","343","3665"] }, { id: "9747439", innerArray: ["3434","38493","4308403840","34343"] }, { id: "0849374", innerArray: ["343434","57575","389843","38493"] } ];
How would I search the objects inside myArray to determine if the string "38493" is present in the innerArray and then return a new array with the id of the object....like such:
var arrayWithIds = ["9747439", "0849374"];
currentElement.innerArray.indexOf("38493")
to tell if the string is in the array and pushescurrentElement.id
onto the result array.