jQuery - Remove object from array
<p>I'm trying to remove an object from an array with </p>

<p>delete array[index]</p>

<p>which is deleting the object from the array however the .length property of the array is still == 1</p>

<p>Any ideas?</p>

<p>PS I'm trying to delete a question e.g. topic->questions[question_id]</p>

<p><img src="http://i.stack.imgur.com/u37gB.png" alt="enter image description here"></p>

<pre><code>if(topic_array[topic_id] !== 'undefined'){
            if(topic_array[topic_id].questions.length &gt; 0){
                for(var i = 0; i &lt; topic_array[topic_id].questions.length; i++){
                    if(topic_array[topic_id].questions[i].question_id == question_id){
                        delete topic_array[topic_id].questions[i];
                        console.log(topic_array);
                    }
                }
            }
        }
</code></pre>
