I have a multidimensional array in javascript. I want to make it so it shows the first record for each unique "name". So for example this:
[{"name":"Adelman , Erica","col1":"Vice President","col2":"test","col3":"test","col4":"73.77%"},
{"name":"Adelman , Erica","col1":"Vice President","col2":"test","col3":"test","col4":"73.77%"},
{"name":"Adelman , Erica","col1":"Vice President","col2":"test","col3":"test","col4":"73.77%"},
{"name":"Adelman , Erica","col1":"Vice President","col2":"test","col3":"test","col4":"73.77%"},
{"name":"Aellen , Nick","col1":"Director","col2":"test","col3":"test","col4":"96.88%"},
{"name":"Armstrong , Peter","col1":"Director","col2":"test","col3":"test","col4":"95.15%"},
{"name":"Ashmore , Abigail","col1":"Vice President","col2":"test","col3":"test","col4":"99.80%"},
{"name":"Avent , Christopher","col1":"Vice President","col2":"test","col3":"test","col4":"90.11%"},
{"name":"Baker , Ian Howard","col1":"Director","col2":"test","col3":"test","col4":"67.20%"},
{"name":"Baker , Ian Howard","col1":"Director","col2":"test","col3":"test","col4":"67.20%"},
Would turn into this:
[{"name":"Adelman , Erica","col1":"Vice President","col2":"test","col3":"test","col4":"73.77%"},
{"name":"Aellen , Nick","col1":"Director","col2":"test","col3":"test","col4":"96.88%"},
{"name":"Armstrong , Peter","col1":"Director","col2":"test","col3":"test","col4":"95.15%"},
{"name":"Ashmore , Abigail","col1":"Vice President","col2":"test","col3":"test","col4":"99.80%"},
{"name":"Avent , Christopher","col1":"Vice President","col2":"test","col3":"test","col4":"90.11%"},
{"name":"Baker , Ian Howard","col1":"Director","col2":"test","col3":"test","col4":"67.20%"},
Originally It was not multivarite and i could use a basic function, but that method wont work for this one. Any ideas? Pretty desperate! Thanks.