I have js array and i use it as map it is dynamic ( in this example it is not )
So i dont know how many elements it will have .
i want to remove all the elements included the one found
This is the final view of the array after loop
movmet_sequence_history:[]
movmet_sequence_history["0"] = "A"
movmet_sequence_history["1"] = "B"
movmet_sequence_history["2"] = "C"
movmet_sequence_history["3"] = "D"
....
....
....
....
movmet_sequence_history["20"] = "Z"
if(movmet_sequence_history["2"] == "C")
{
//HERE I WANT TO REMOVE THE ELEMENTS "2" ,"1" ,"0"
//Only the movmet_sequence_history["3"] = "D" will remain
}
UPDATE: i dont what manually delete the right elements as i said the array is dynamic and i dont know how many elements will be up to the found one