我从服务中收到以下json
对象:
[{
"EmployeeID": 8513,
"EmployeeName": "Afridi,Masoom Khan",
"EmployeeMailID": "Masoom.Afridi@COELAB.COM",
"Vertical": "INFRA",
"ProjectID": "000000000002105",
"ProjectDescription": "ITH - Data Center Impl.",
"PeriodEndDate": "19-JUN-16",
"TimeSheetID": "0001612322",
"CreationDate": "27-JUN-16",
"SubmissionDate": "27-JUN-16",
"TimeSheetStatus": "NA",
"Approver": "MISHRA,BISWAJIT",
"ApproverMailID": "biswajit.mishra@COELAB.COM"
}, {
"EmployeeID": 8513,
"EmployeeName": "Afridi,Masoom Khan",
"EmployeeMailID": "Masoom.Afridi@COELAB.COM",
"Vertical": "INFRA",
"ProjectID": "000000000002105",
"ProjectDescription": "ITH - Data Center Impl.",
"PeriodEndDate": "26-JUN-16",
"TimeSheetID": "0001612324",
"CreationDate": "27-JUN-16",
"SubmissionDate": "27-JUN-16",
"TimeSheetStatus": "NA",
"Approver": "MISHRA,BISWAJIT",
"ApproverMailID": "biswajit.mishra@COELAB.COM"
}]
我想将给定的对象转换为以下json
格式:
[{
"ProjectID": "000000000002105",
"ProjectDescription": "ITH - Data Center Impl.",
"Approver": "MISHRA,BISWAJIT",
"ApproverMailID": "biswajit.mishra@COELAB.COM",
"Employee": {
"EmployeeID": 8513,
"EmployeeName": "Afridi,Masoom Khan",
"EmployeeMailID": "Masoom.Afridi@COELAB.COM",
"Vertical": "INFRA",
"TimeSheet": [{
"PeriodEndDate": "26-JUN-16",
"TimeSheetID": "0001612324",
"CreationDate": "27-JUN-16",
"SubmissionDate": "27-JUN-16",
"TimeSheetStatus": "NA"
}, {
"PeriodEndDate": "19-JUN-16",
"TimeSheetID": "0001612322",
"CreationDate": "27-JUN-16",
"SubmissionDate": "27-JUN-16",
"TimeSheetStatus": "NA"
}]
}
}]
你能帮忙吗?