我已设法将所有用户数据放入数组中(请参阅此处),但现在我无法循环访问数据。构建数组后,我已将其转换为 JSON,但我无法再处理 JSON 架构中定义的字段。
我在循环中唯一可以解决的问题(我使用 JSON 正文作为 For Each 循环的输入)是正文本身,而不是用户名、邮件地址等各个字段。
我是否应该更改 JSON 架构中的某些内容来解决此问题,还是有其他问题?
编辑:请在下面找到我的 JSON 架构:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"items": [
{
"properties": {
"@@odata.type": {
"type": "string"
},
"createdDateTime": {
"type": "string"
},
"employeeId": {
"type": "string"
},
"givenName": {
"type": "string"
},
"id": {
"type": "string"
},
"mail": {
"type": "string"
},
"onPremisesSamAccountName": {
"type": "string"
},
"surname": {
"type": "string"
},
"userPrincipalName": {
"type": "string"
}
},
"required": [
"@@odata.type",
"id",
"givenName",
"surname",
"userPrincipalName",
"mail", …Run Code Online (Sandbox Code Playgroud)