I have an array of objects(like this)
[
{teamName: 'first', playerId: 316}
{teamName: 'first', playerId: 315}
{teamName: 'first', playerId: 316}
{teamName: 'first', playerId: 316}
{teamName: 'second', playerId: 315}
{teamName: 'second', playerId: 318}
{teamName: 'third', playerId: 318}
{teamName: 'third', playerId: 316}
]
And I need to write a function which removes some identical objects in array, and the output should be like this:
[
{teamName: 'first', playerId: 315}
{teamName: 'first', playerId: 316}
{teamName: 'second', playerId: 315}
{teamName: 'second', playerId: 318}
{teamName: 'third', playerId: 318}
{teamName: 'third', playerId: 316}
]
Thanks!