| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 654 人关注过本帖, 1 人收藏
标题:老师,请教JSON读取的记录的问题
取消只看楼主 加入收藏
laibinhua
Rank: 2
等 级:论坛游民
威 望:1
帖 子:295
专家分:38
注 册:2010-12-23
结帖率:58.02%
收藏(1)
 问题点数:0 回复次数:2 
老师,请教JSON读取的记录的问题
【读取方法这样报错,读取不到数据field_code,请问原因:】
m.cJsonStr3=[var json=]+cTxt+[;]
m.oJs3=CREATEOBJECT("MSScriptControl.ScriptControl")
m.oJs3.Language="jscript"
m.oJs3.addCode(m.cJsonStr3)
m.oSon3=m.oJs3.CodeObject.json.result.field_data_list
FOR EACH m.SubItem IN m.oSon3
    l_user1=m.SubItem.field_code
ENDFOR

【cTxt字符串如下:】  
{"errcode":0,"errmsg":"ok","result":[{"corp_id":"ding0a2c55ff26c8472da1320dcb25e91351","field_data_list":[{"field_code":"sys01-positionLevel","field_name":"岗位职级","field_value_list":[{"item_index":0}],"group_id":"sys01"},{"field_code":"sys00-tel","field_name":"分机号","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys05-nowContractEndTime","field_name":"现合同到期日","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys01-regularTime","field_name":"实际转正日期","field_value_list":[{"item_index":0}],"group_id":"sys01"},{"field_code":"sys00-reportManager","field_name":"直属主管","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys00-remark","field_name":"备注","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys00-position","field_name":"职位","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys00-name","field_name":"姓名","field_value_list":[{"item_index":0,"label":"叶波","value":"叶波"}],"group_id":"sys00"},{"field_code":"sys00-email","field_name":"邮箱","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys00-dept","field_name":"部门","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys00-entryAge","field_name":"司龄(系统计算)","field_value_list":[{"item_index":0,"label":"","value":""}],"group_id":"sys00"},{"field_code":"sys01-employeeType","field_name":"员工类型","field_value_list":[{"item_index":0,"label":"全职","value":"1"}],"group_id":"sys01"},{"field_code":"sys00-deptIds","field_name":"部门id","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys05-contractPeriodType","field_name":"合同期限","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys01-probationPeriodType","field_name":"试用期","field_value_list":[{"item_index":0}],"group_id":"sys01"},{"field_code":"sys02-age","field_name":"年龄(系统计算)","field_value_list":[{"item_index":0,"label":"","value":""}],"group_id":"sys02"},{"field_code":"sys05-contractRenewCount","field_name":"续签次数","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys00-workPlace","field_name":"办公地点","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys00-mainDept","field_name":"主部门","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys05-contractType","field_name":"合同类型","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys05-firstContractEndTime","field_name":"首次合同到期日","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys02-workAge","field_name":"工龄(系统计算)","field_value_list":[{"item_index":0,"label":"","value":""}],"group_id":"sys02"},{"field_code":"sys05-contractCompanyName","field_name":"合同公司","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys00-mainDeptId","field_name":"主部门id","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys05-firstContractStartTime","field_name":"首次合同起始日","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys05-nowContractStartTime","field_name":"现合同起始日","field_value_list":[{"item_index":0}],"group_id":"sys05"},{"field_code":"sys00-confirmJoinTime","field_name":"入职时间","field_value_list":[{"item_index":0}],"group_id":"sys00"},{"field_code":"sys01-planRegularTime","field_name":"计划转正日期","field_value_list":[{"item_index":0}],"group_id":"sys01"},{"field_code":"sys-authRealName","field_name":"实人认证","field_value_list":[{"item_index":0,"label":"未授权","value":"1"}],"group_id":"sys"},{"field_code":"sys00-mobile","field_name":"手机号","field_value_list":[{"item_index":0,"label":"+86-18580640160","value":"+86-18580640160"}],"group_id":"sys00"},{"field_code":"sys02-joinWorkingTime","field_name":"首次参加工作时间","field_value_list":[{"item_index":0}],"group_id":"sys02"},{"field_code":"sys01-employeeStatus","field_name":"员工状态","field_value_list":[{"item_index":0,"label":"离职","value":"4"}],"group_id":"sys01"},{"field_code":"sys00-jobNumber","field_name":"工号","field_value_list":[{"item_index":0,"label":"A00003","value":"A00003"}],"group_id":"sys00"}],"userid":"6823515547694188"}],"success":true,"request_id":"16kcgex4u02q4"}

[此贴子已经被作者于2023-6-26 14:26编辑过]

搜索更多相关主题的帖子: 统计 value label 记录 读取 
2023-06-26 14:19
laibinhua
Rank: 2
等 级:论坛游民
威 望:1
帖 子:295
专家分:38
注 册:2010-12-23
收藏
得分:0 
回复 4楼 厨师王德榜
谢谢大佬回复
2023-06-28 10:48
laibinhua
Rank: 2
等 级:论坛游民
威 望:1
帖 子:295
专家分:38
注 册:2010-12-23
收藏
得分:0 
回复 4楼 厨师王德榜
谢谢你的方法真好我这边好用

[此贴子已经被作者于2023-6-28 11:06编辑过]

2023-06-28 11:01
快速回复:老师,请教JSON读取的记录的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019050 second(s), 11 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved