Javascript & jQuery: Updating array of objects
<p>I encountered some difficulties while trying to find a good logic to update an array of objects in Javascript.<br>
I obtain the first array by doing a request to the server. I get an array of objects like the following one:  </p>

<pre><code>{id: 2, text: 'some text'}  //Object
</code></pre>

<p>And this is what the array looks like:</p>

<pre><code>[Object, Object, Object]    
</code></pre>

<p>These objects are turned into html.<br>
After a while, it does a second request and gets a new list of data objects. How can I synchronize the old list with the new one? What I mean by synchronizing is: remove the objects that don't exist anymore, and the associated html part as well, and insert the nodes that are not currently present in the right position. </p>
