我现在需要实现编辑的时候 用修改后的json和修改前的json做比较,判断是否相同,并取出不同的属性及新值旧值存入数据库
{"id":"a1111","name":"jsp","phone":"13002225200","age":"11","student":{"student_id":"a111","student_name":"xiaoming","student_phone":"1231231231","student_age":"11"}}
{"id":"u2id","name":"u2name","phone":"u213002225200","age":"u2age","student":{"student_id":"a1112","student_name":"xiaobai","student_phone":"123123123221","student_age":"11"}}
这俩个json进行对比,id不同,返回 修改属性:id,旧值:"a1111",新值:"u2id"....
大神们这样如何实现,嵌套的属性,如何实现呢。