title: SharePoint 2010 REST API JQUery Insert, Update, Delete
body: <p>Can anyone explain or point me to a link with samples of doing Update, Delete using Jquery with the SharePoint 2010 Rest API?</p>
  
  <p>I have the insert working and of course queries since the MSDN documentation explains and every tutorial on the net explains queries but just wondering if anyone ever inserts, updates, deletes data instead of only samples and tutorials on querying? Yes I know I can use the CSOM but I want to learn how this is done via jquery and sharepoint rest? </p>
  
  <p>Also I want to use Merge for updating.</p>
  
  <p>Here's the working insert code:</p>
  
  <pre><code>function insertMilestone() {
              var mileStonesListUrl = "/_vti_bin/listdata.svc/Milestones";    
                 var milestone = {};
                 milestone.Title = "Testing from REST";
  
                 var entry = JSON.stringify(milestone);
  
                 $.ajax({
                     type: "POST",
                     url: mileStonesListUrl,
                     data: entry,
                     contentType: "application/json; charset=utf-8",
                     error: function (xhr) {
                         alert(xhr.status + ": " + xhr.statusText);
                     },
  
                     success: function () {
                         getAll();
  
                     }
                 });
             }
  </code></pre>