I am working with a multidimensional array that looks like this:
myArray = [
["ooooh", "that"],
["dog ", "of"],
["mine", "word...."]
]
My goal is to remove the array item: ["ooooh", "that"]
Although I know that element 0 is "ooooh"
and element 1 is "that"
, I do not know the position of these elements within the larger array. Is there an efficient way to achieve this?
After researching, I found suggestions like delete myArray['1']
or knowing the index of the element in the array - but in my case, I need both elements 0 and 1 to match for removal.
In pseudo code, I would like to do something like:
myArray.destroy(["ooooh", "that"])
Any ideas on how to make this happen?