如何判断一个对象中的属性和改属性对应的Old值完全相同。其属性中包含有数组。
{
"nameEn": "zhangsan",
"nameEnOld": "zhangsan",
"nameZh": "张三",
"nameZhOld": "张三",
"nation": "中国",
"nationOld": "中国",
"nativePlace": "上海",
"nativePlaceOld": "上海",
"officeLocation": "合肥",
"officeLocationOld": "合肥",
"jobExperienceList": [
{
"attesters": "",
"beginDate": "2019-06-01 00:00:00",
"companyName": "某公司",
"contactPhone": "18900009898",
"contactSceoId": "",
"createdEmpId": "00000001",
"createdTime": "2022-07-05 17:49:53",
"endDate": "2020-02-01 00:00:00",
"id": "a5684b5243904ea0ba73407014c6ea7b",
"isDeleted": false,
"jobContent": "",
"modifiedEmpId": "",
"modifiedTime": null,
"pid": "5bcbf4231fd048c3a0b11da79aec78b8",
"position": "哈哈哈哈哈",
"relationId": "FR0001"
}
],
"jobExperienceListOld": [
{
"attesters": "",
"beginDate": "2019-06-01 00:00:00",
"companyName": "某公司",
"contactPhone": "18900009898",
"contactSceoId": "",
"createdEmpId": "00000001",
"createdTime": "2022-07-05 17:49:53",
"endDate": "2020-02-01 00:00:00",
"id": "a5684b5243904ea0ba73407014c6ea7b",
"isDeleted": false,
"jobContent": "",
"modifiedEmpId": "",
"modifiedTime": null,
"pid": "5bcbf4231fd048c3a0b11da79aec78b8",
"position": "哈哈哈哈哈",
"relationId": "FR0001"
}
]
}
可以参考一些
diff
算法,基础算法为最短编辑距离
。