I have an array which is missing values for some indices, Can you please suggest which is the best way to fill them with either null or 0 something, I have tried possible ways in lodash and nothin seems to be working.
Followed below question and nothing helped
Filling the missing index and filling its value with 0
fill multiple missing values with series based on index values
Python - filling a list of tuples with zeros in places of missing indexes
console.log of my array yields below output
[ 5289, <1 empty item>, 20460, 10860, '189', 'D2989', <1 empty item>, <2 empty items>, '-' ]
Where I want to fill this as
[ 5289, null, 20460, 10860, '189', 'D2989', null, null,null, '-' ]