Convert string to data and filter it

Hi! I’m stuck with (probably very easy) challange from my friend :slight_smile: I’ve got a data set with users. I have to filter them by joined date after 01/01/2010, but in the set all of dates have a string form. How to do it step by step?

First task was easy for me (filter by gender), here is my solution
// 1. Create separate array of male

   const arrMale = data.filter(({ gender }) => gender === 'Male'); 

I want to filter date with a similar method but firstly I have to change string into date and have no idea how. You can see how the data set looks like:

Huge thanks for any of your answers!

try following code :

const date=data.filter(({joined})=>{
  const arr=joined.split('/');
  if (arr[0].substring(0,1)=='0'){arr[0]=arr[0].substring(1)};

  if (arr[0]>='1' && arr[1]>='1' && arr[2]>=2010){
    return joined;

Would have been nice to have a little sample of the data.

I believe you can construct Date objects and compare them.

const maleByDate = data
  .filter(({ gender }) => gender === 'male')
  .filter(({ joined }) => new Date('01/01/2010') < new Date(joined));