can not retrieve values by using associative arrays, javascript and node.js

I tried a lot to retrieve key-values from a associated array but failed, though they are there proved by printing! What are some bugs? Curious and interesting!

input file 1: pilbara_all_id.txt enter image description here ...

input file 2: sample_metadata.txt enter image description here ...

command line: node test.js pilbara_all_id.txt sample_metadata.txt >test

my code test.js below:

const fs = require('fs');

const in_all_id =process.argv[2];
const in_species_infor =process.argv[3];

const speciesLines = fs.readFileSync(in_species_infor).toString().split('\n');
let speciesFields = {};
for(let i=0; i<speciesLines.length-1; i++){
  let speciesFields = speciesLines[i].match(/\/(\d+).+WA\s+(.+\S+)/);
  if (speciesFields){
    console.log(speciesFields[1] + "\t" + speciesFields[2]);
    //console.log(typeof speciesFields[1]);
    speciesFields[speciesFields[1]] = speciesFields[2];
//console.log("22260" + "\t" + speciesFields["22260"]);

const idLines = fs.readFileSync(in_all_id).toString().split('\n');
//let idArrays = [];
for(let i=0; i<idLines.length-1; i++){
  let id = idLines[i].match(/(\S+)/);
  console.log(id[1] + "\t" + speciesFields[id[1]]);

After ran the code, I always got "undefined" for all keys. For example: 22260 Cymbopogon obtectus(what I want) 22260 undefined(errors)

Any suggestions? Thanks very much!