結果 : get first element of array if exists javascript