How can i update the following JSON object dynamically using javascript or Jquery?
var jsonObj = [{\'Id\':\'1\',\'Username\':\'Ray\',\'FatherName\':\'Thompso
var i = jsonObj.length; while ( i --> 0 ) { if ( jsonObj[i].Id === 3 ) { jsonObj[ i ].Username = 'Thomas'; break; } }
Or, if the array is always ordered by the IDs:
jsonObj[ 2 ].Username = 'Thomas';