To change ISO date string to Date object with JavaScript, we use moment.js.
For instance, we write
const d = moment("2022-11-03T19:38:34.203Z", "YYYY-MM-DD HH:mm").toDate();
to call moment
with the ISO date string and the date format to parse the date into a moment object that has the date in UTC.
Then we call toDate
to convert it to a JavaScript date object.