Updating a JSON object using Javascript

前端 未结 9 1531
Happy的楠姐
Happy的楠姐 2020-12-07 13:37

How can i update the following JSON object dynamically using javascript or Jquery?

var jsonObj = [{\'Id\':\'1\',\'Username\':\'Ray\',\'FatherName\':\'Thompso         


        
9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-07 14:15

    JSON is the JavaScript Object Notation. There is no such thing as a JSON object. JSON is just a way of representing a JavaScript object in text.

    So what you're after is a way of updating a in in-memory JavaScript object. qiao's answer shows how to do that simply enough.

提交回复
热议问题