我需要你的幫助。在陣列中查找匹配的字符串並重新寫入陣列
我希望能夠在數組中找到一個字符串,並基於是否已經找到該值,以便能夠相應地獲取數組。
var temp = ["BNI to John", "BNI to Smith", "BNI to Jane", "BNA to Craig", "BNA to David", "BNA to Michelle", "Media Call", "Report Paper", "Issue Paper"]
現在一些加工....
If ("BNI to" matches what is in the array temp then) {
Find the instance of "BNI to" and re-label to single name: Briefing Notes (Info)
}
If ("BNA to" matches what is in the array temp then) {
Find the instance of "BNA to" and re-label to single name: Briefing Notes (Approval)
}
重新寫入和輸出相同的溫度陣列現在讀作:
var temp = ["Briefing Notes (Info)", "Briefing Notes (Approval)", "Media Call", "Report Paper", "Issue Paper"]
而問題/問題是什麼? – Andreas
完全匹配或丟失一個? – MaxZoom
問題是這對我來說似乎是微積分。我不知道如何編碼。 – BobbyJones