Friday 19 May 2017

Remove reverse values from a multidimentional array using javascript

I am creating a multidimensional array to draw sankey chart. But it doesn't support cycle values. So i want to remove an array if it comes in reverse oerder. For eg: if i have an array named,

   var myArray = [['aaa','20'],['bbb','30'],['ccc','40'],['30','bbb']] 

I want to get a result as follows:

var myArray = [['aaa','20'],['bbb','30'],['ccc','40']]



via sunil kumar e u

No comments:

Post a Comment