首页 > 解决方案 > 从数组定义 JSON 变量

问题描述

有人能告诉我如何从数组中定义 JSON 变量吗?

API 端点想要从 POST 请求中接收一个数字,并且该数字包含在一个数组中:

"template_job_id": "4109170002" 

x 存储在这个数组中,应该是value = 4109170002

"custom_fields_values": [
{
"id": 122709143,
"custom_field_id": 1202201,
"name": "ID",
"value": "4109170002",
"attachment": null,
"options": "",
"type": 1,
"type_name": "Text",
"entity": null,
"user": null,
"show_on_portal": false,
"mandatory": true
},
{
"id": 121273903,
"custom_field_id": 1202206,
"name": "Verified Title",
"value": "",
"attachment": null,
"options": "",
"type": 1,
"type_name": "Text",
"entity": null,
"user": null,
"show_on_portal": null,
"mandatory": true
}
],

标签: arraysjson

解决方案


推荐阅读