找回密码
 立即注册

QQ登录

只需一步,快速开始

ahjuxin.net

初级会员

30

主题

114

帖子

336

积分

初级会员

积分
336
ahjuxin.net
初级会员   /  发表于:2023-5-19 14:49  /   查看:2634  /  回复:3
1金币
目前有数据集如下:{"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
这个函数要怎么写呢?
附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

您好,将您的帖子移动至AR版本的求助中心,根据您的需求,表达式可以这样编写:

3 个回复

倒序浏览
最佳答案
最佳答案
Bella.YuanWyn认证
超级版主   /  发表于:2023-5-19 14:49:21
来自 4#
ahjuxin.net 发表于 2023-5-19 15:18
我们用的是activeReport,可以发一下这个.rdlx的文件嘛,还有你这个是遍历的嘛?我现在不需要遍历,只是 ...

您好,将您的帖子移动至AR版本的求助中心,根据您的需求,表达式可以这样编写:
  1. {toarray(weigh, "数据集2").item(2)}
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Eden.SunWyn认证
超级版主   /  发表于:2023-5-19 15:04:36
2#
您好,您这个是JSON数据,可以直接通过json表达式获取到数据:
$.packingDetail.
  • .weigh


  • 本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复 使用道具 举报
    ahjuxin.net
    初级会员   /  发表于:2023-5-19 15:18:40
    3#
    Eden.Sun 发表于 2023-5-19 15:04
    您好,您这个是JSON数据,可以直接通过json表达式获取到数据:
    $.packingDetail.
  • .weigh

  • 我们用的是activeReport,可以发一下这个.rdlx的文件嘛,还有你这个是遍历的嘛?我现在不需要遍历,只是想单纯的获取其中固定位数数组的某一个值哦
    回复 使用道具 举报
    您需要登录后才可以回帖 登录 | 立即注册
    返回顶部