Remove duplicates in an object array Javascript
<p>I have an array of objects </p>

<pre><code>list = [{x:1,y:2}, {x:3,y:4}, {x:5,y:6}, {x:1,y:2}]
</code></pre>

<p>And I'm looking for an efficient way (if possible <code>O(log(n))</code>) to remove duplicates and to end up with </p>

<pre><code>list = [{x:1,y:2}, {x:3,y:4}, {x:5,y:6}]
</code></pre>

<p>I've tried <code>_.uniq</code> or even <code>_.contains</code> but couldn't find a satisfying solution. </p>

<p>Thanks! </p>

<p>Edit : The question has been identified as a duplicate of another one. I saw this question before posting but it didn't answer my question since it's an array of object (and not a 2-dim array, thanks Aaron), or at least the solutions on the other question weren't working in my case.</p>