title: How to solve the "TypeError: array.splice is not a function" when 'var array = {}'?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/208105/how-to-remove-a-property-from-a-javascript-object">How to remove a property from a javascript object</a><br>
    <a href="https://stackoverflow.com/questions/368280/javascript-hashmap-equivalent">JavaScript Hashmap Equivalent</a>  </p>
  </blockquote>
  
  
  
  <p>I am using jQuery and I am handling a variable this way:</p>
  
  <pre><code>var array = {};
  
  array[an_object]      = something
  array[another_object] = something_else
  array[...]            = ...
  </code></pre>
  
  <p>When I try to run the <a href="http://www.w3schools.com/jsref/jsref_splice.asp" rel="noreferrer"><code>splice</code></a> method on the <code>array</code> I get a <code>TypeError: array.splice is not a function</code>. <em>My intent is to remove the <code>an_object</code> "key" and all its content from the <code>array</code> variable.</em></p>
  
  <p>How can I make that? </p>
  
  <hr>
  
  <p><em>Note</em>: When I run the <code>console.log(array[an_object])</code> (the same is valid for <code>another_object</code> and all other objects) I get:</p>
  
  <pre><code>[Object { label="str1",  value=1 }, Object { label="str2",  value=2 }, { label="strN",  value=N }]
  </code></pre>