Please help me to do this!
I'm getting data array from database by month. The problem I'm having is that I'm fetching data like this
[{January: 6}, {February: 2}, {October: 7}, {December: 4}, {November: 5374}]
wherever there is null I don't even get any value which causes problem for me to work so I want data like this
[{January: 6}, {February: 2}, {March: 0}, {April: 0}, {May: 0}, {June: 0}, {July: 0}, {August: 0}, {September: 0}, {October: 7}, {November: 5373}, {December: 4}]
but data is fetched dynamically from database which is giving me only values which are more than 0. I just want to get all months with default values as 0.
null(or0)? Or absent altogether? With the current information, it's impossible to say for certain why nullish entries get skipped.