title: How to change value inside a JSON string
body: <p>I have a <s>JSON</s> <s>string</s> array of objects like this.</p>
  
  <pre><code>[{"id":"4","rank":"adm","title":"title 1"},
  {"id":"2","rank":"mod","title":"title 2"},
  {"id":"5","rank":"das","title":"title 3"},
  {"id":"1","rank":"usr","title":"title 4"},
  {"id":"3","rank":"ref","title":"title 5"}]
  </code></pre>
  
  <p>I want to change the title value of it, once the id is matching. So if my variable myID is 5, I want to change the title "title 5" to new title, and so on. And then I get the new JSON array to <code>$("#rangArray").val(jsonStr);</code></p>
  
  <p>Something like</p>
  
  <pre><code>$.each(jsonStr, function(k,v) {
      if (v==myID) {
          this.title='new title'; $("#myTextArea").val(jsonStr);
      }
  });
  </code></pre>
  
  <p>Here is the full code.</p>
  
  <pre><code>$('img.delete').click(function() {
  var deltid = $(this).attr("id").split('_');
  var newID = deltid[1];
  var jsonStr = JSON.stringify(myArray);
  $.each(jsonStr, function(k,v) {
  if (v==newID) {
  // how to change the title
  jsonStr[k].title = 'new title';
  alert(jsonStr);
  $("#rangArray").val(jsonStr);
  }
  });
  });
  </code></pre>
  
  <p>The above is not working. Any help please?</p>