2 回答
TA贡献1829条经验 获得超7个赞
我认为你应该重新格式化你的数组
roles: [
{ Operational: [
"Drives cloud standards for adopting cloud services to ensure consistency.",
"Provide regular, clear, and consistent communication (written and oral) on the status of projects, issues, and deliverables to representatives from the customer/vendor.",
"Develop and maintain understanding of key processes, schedules, cycles, profiles, etc. for the technical systems in use by a customer.",
"Work with IT and Business management to evaluate complex user requests, large projects and strategies.",
"Perform analysis of large-scale, complex, cross-system, cross-platform changes or issues.",
] },
{ Acquisition: [
"Work with cloud vendors to evaluate and select services that can support agile business requirements",
"Prepare ROI analysis and assist with creating budget proposals to initiate the acquisition of cloud services",
"Mitigate significant risks associated with large cloud projects, which have a hig",
"complexity and/or involve significant challenges to the business and systems",
"Partner with internal teams and cloud vendors on software and hardware selection and produce and present cost and value benefit analyses",
] },
],
TA贡献1802条经验 获得超6个赞
首先,您必须按照@iamhuynq 的建议更改格式。
然后你可以得到这样的钥匙
roles.map(a => {
console.log(Object.keys(a)[0]) // key
console.log(a) // object
)
或者你可以改变这样的结构
roles = {
Operational: [
"Drives cloud standards for adopting cloud services to ensure consistency.",
"Provide regular, clear, and consistent communication (written and oral) on the status of projects, issues, and deliverables to representatives from the customer/vendor.",
"Develop and maintain understanding of key processes, schedules, cycles, profiles, etc. for the technical systems in use by a customer.",
"Work with IT and Business management to evaluate complex user requests, large projects and strategies.",
"Perform analysis of large-scale, complex, cross-system, cross-platform changes or issues.",
],
Acquisition: [
"Work with cloud vendors to evaluate and select services that can support agile business requirements",
"Prepare ROI analysis and assist with creating budget proposals to initiate the acquisition of cloud services",
"Mitigate significant risks associated with large cloud projects, which have a hig",
"complexity and/or involve significant challenges to the business and systems",
"Partner with internal teams and cloud vendors on software and hardware selection and produce and present cost and value benefit analyses",
]
};
得到这样的钥匙
Object.keys(roles).map(a => {
console.log(a) // key
console.log(roles[a]) // object
})
添加回答
举报