I have one array with dates having format as a DD-MM-YYYY. I have to take only DD i.e. days from it and push in another array.
I am trying using split function to separate out it but not able to push into array.
let arrayData = ["15-07-2022", "18-07-2022", "20-07-2022"];
let pushData = [];
arrayData.map(x => (
pushData.push(x.split('-'))
))
//output should be [15,18,20]