SOURCE

const res = {
    "code": 20000,
    "msg": "Success",
    "results": {
        "Url": "",
        "NickName": "天润融通",
        "Vals": {
            "1": "b3d4012ac7ad5e9279f9cd029434a528",
            "2": "R7sRTlLsY44H85338X11",
            "3": "inout",
            "4": "8004887"
        },
        "AppConfiguration": [
            {
                "id": 1,
                "app_id": 5,
                "organization_id": 1,
                "field_name": "AccessKeyId",
                "name": "",
                "tips": "",
                "from_type": "",
                "is_required": 1,
                "is_disabled": 0,
                "status": 1,
                "changeable": 1,
                "configs": "",
                "is_delete": 0,
                "create_at": "2022-05-11T20:25:13Z",
                "update_at": "2022-05-11T20:32:01Z"
            },
            {
                "id": 2,
                "app_id": 5,
                "organization_id": 1,
                "field_name": "AccessKeySecret",
                "name": "",
                "tips": "",
                "from_type": "",
                "is_required": 1,
                "is_disabled": 0,
                "status": 1,
                "changeable": 1,
                "configs": "",
                "is_delete": 0,
                "create_at": "2022-05-11T20:25:59Z",
                "update_at": "2022-05-11T20:32:01Z"
            },
            {
                "id": 3,
                "app_id": 5,
                "organization_id": 1,
                "field_name": "AudioType",
                "name": "",
                "tips": "",
                "from_type": "",
                "is_required": 1,
                "is_disabled": 0,
                "status": 1,
                "changeable": 1,
                "configs": "",
                "is_delete": 0,
                "create_at": "2022-05-11T20:26:37Z",
                "update_at": "2022-05-11T20:32:02Z"
            }
        ]
    }
}

function getDesc(val) {
    return val.map((item) => {
        const { name, tips, form_type, is_required, is_disabled, configs } =
            item;
        return {
            label: name,
            tips,
            type: form_type,
            configs,
            required: !!is_required,
            disabled: !!is_disabled
        };
    });
}

const des = getDesc(res.results.AppConfiguration)
console.log(des)
console 命令行工具 X clear

                    
>
console