結果 : javascript array replace element if exists