目前有数据集如下:{"boxNumber":null,"code":"TTRY230517004","comId":"717e87a89339966e01aae483a3fea5bb","finishedType":"QZY-2/180","number":16,"packingDetail":[{"fId":null,"packingId":null,"weigh":28.960,"weighCode":"T43-2230516009"},{"fId":null,"packingId":null,"weigh":29.280,"weighCode":"T43-2230516019"},{"fId":null,"packingId":null,"weigh":29.250,"weighCode":"T43-2230517001"},{"fId":null,"packingId":null,"weigh":29.240,"weighCode":"T43-2230516011"},{"fId":null,"packingId":null,"weigh":28.860,"weighCode":"T43-2230517004"},{"fId":null,"packingId":null,"weigh":29.260,"weighCode":"T43-2230516015"},{"fId":null,"packingId":null,"weigh":29.250,"weighCode":"T43-2230516016"},{"fId":null,"packingId":null,"weigh":28.720,"weighCode":"T43-2230516018"},{"fId":null,"packingId":null,"weigh":29.260,"weighCode":"T43-2230516017"},{"fId":null,"packingId":null,"weigh":29.230,"weighCode":"T43-2230516010"},{"fId":null,"packingId":null,"weigh":29.250,"weighCode":"T43-2230516013"},{"fId":null,"packingId":null,"weigh":29.260,"weighCode":"T43-2230517003"},{"fId":null,"packingId":null,"weigh":29.270,"weighCode":"T43-2230517002"},{"fId":null,"packingId":null,"weigh":29.260,"weighCode":"T43-2230516014"},{"fId":null,"packingId":null,"weigh":28.070,"weighCode":"T43-2230516008"}],"packingTime":"2023-05-17","prodCode":null,"spec":0.690,"spool_type":"PT-25(回黑)","weight":448.120},
我现在想去packingDetail数组中第三个中的weigh值,即:29.250
这个函数要怎么写呢?
|