I have an object with numeric keys that I would like to convert to an array. Trouble is, the keys may not be contiguous, i.e. some of the array elements may be missing. Is there some simple way to do this?
Example:
const raggedArrayObj = {"0": 10, "1": 3, "3": 5}
const raggedArray = toArray(raggedArrayObj) // [10, 3, , 5]