我正在学习JavaScript,这可能是一个基础问题,请帮助我实现以下目标。
我正在对象内构建一个数组,如下所示,以便稍后使用数据。现在,我需要将类别发送为“帮助”,并需要动态获取所有子类别的值。
[
{"category":"Help","subcategory":"Email"},
{"category":"Help","subcategory":"application"},
{"category":"Help","subcategory":"Software"},
{"category":"Help","subcategory":"Hardware"},
{"category":"Request","subcategory":"Access"},
{"category":"Request","subcategory":"Remote"},
]
提前感谢您