Group By Array Javascript Append W3schools Python Programming