我有我的數據集配置爲過濾多維數組
var x = [
{"phaseName":"Initiation","phaseID":"595e382f1a1e9124d4e2600c"},
{"phaseName":"Execution","phaseID":"595e38321a1e9124d4e2600d"}
]
我想寫一些功能,這給過濾數據的輸出。 例如
var y ="Initiation"
samplefunction(y)
和我得到的{"phaseName":"Initiation","phaseID":"595e382f1a1e9124d4e2600c"}
你想測試對象的每個屬性? –
'''phaseName''是關鍵字段嗎? – Champ