后端返回来的数据 reviewerAssignNum 和 paperQuestionIdList
reviewerAssignNum: [{pageNo: null, limitSize: null, operatorId: 70, operatorName: "azheng", questionId: 15224, num: 1},…]
0: {pageNo: null, limitSize: null, operatorId: 70, operatorName: "azheng", questionId: 15224, num: 1}
1: {pageNo: null, limitSize: null, operatorId: 70, operatorName: "azheng", questionId: 15229, num: 3}
2: {pageNo: null, limitSize: null, operatorId: 70, operatorName: "azheng", questionId: 15232, num: 3}
3: {pageNo: null, limitSize: null, operatorId: 70, operatorName: "azheng", questionId: 15233, num: 3}
4: {pageNo: null, limitSize: null, operatorId: 72, operatorName: "张三", questionId: 15220, num: 3}
5: {pageNo: null, limitSize: null, operatorId: 72, operatorName: "张三", questionId: 15224, num: 1}
6: {pageNo: null, limitSize: null, operatorId: 72, operatorName: "张三", questionId: 15226, num: 3}
7: {pageNo: null, limitSize: null, operatorId: 72, operatorName: "张三", questionId: 15230, num: 3}
8: {pageNo: null, limitSize: null, operatorId: 72, operatorName: "张三", questionId: 15234, num: 3}
9: {pageNo: null, limitSize: null, operatorId: 73, operatorName: "TEST", questionId: 15219, num: 3}
10: {pageNo: null, limitSize: null, operatorId: 73, operatorName: "TEST", questionId: 15224, num: 1}
11: {pageNo: null, limitSize: null, operatorId: 73, operatorName: "TEST", questionId: 15228, num: 3}
]
paperQuestionIdList: [15224, 15226, 15228, 15229, 15230, 15231, 15232, 15234, 15219, 15233, 15220]
有这样一个数组,是后端返回回来的数据,我们要根据 paperQuestionIdList 中 数字 对应 reviewerAssignNum 中的 questionId, 转换成一个 这样的数据:(是个对象 key值是 questionId value 值 是 reviewerAssignNum 数组中 相同 的questionId 的 对象)
{
15219: [{…}]
15220: [{…}]
15224: (3) [{…}, {…}, {…}]
15226: [{…}]
15228: [{…}]
15229: [{…}]
15230: [{…}]
15231: [{…}]
15232: [{…}]
15233: [{…}]
15234: [{…}]
}.