我正在學習JavaScript,這可能是一個基本問題,請幫助我在下面獲得成果。使用javascript從以下對象獲取Key值對
我正在像下面這樣在obejct中構造一個數組以便稍後使用數據。現在,我必須將類別作爲「幫助」發送,並且需要動態獲取所有子類別的值。
[
{"category":"Help","subcategory":"Email"},
{"category":"Help","subcategory":"application"},
{"category":"Help","subcategory":"Software"},
{"category":"Help","subcategory":"Hardware"},
{"category":"Request","subcategory":"Access"},
{"category":"Request","subcategory":"Remote"},
]
在此先感謝
謝謝你,它的工作! –