title: JSON find in JavaScript
body: <p>Is there a better way other than looping to find data in <a href="http://en.wikipedia.org/wiki/JSON" rel="noreferrer">JSON</a>? It's for edit and delete.</p>
  
  <pre><code>for(var k in objJsonResp) {
    if (objJsonResp[k].txtId == id) {
      if (action == 'delete') {
        objJsonResp.splice(k,1);
      } else {
        objJsonResp[k] = newVal;
      }
      break;
    }
  }
  </code></pre>
  
  <p>The data is arranged as list of maps.
  Like:</p>
  
  <pre><code>[
    {id:value, pId:value, cId:value,...},
    {id:value, pId:value, cId:value,...},
    ...
  ]
  </code></pre>