title: Getting address of a token account given a Solana wallet address
body: <p>I've been trying the code below to get the spl-token account address for a specific token in a Solana wallet from the Solana wallet address,  but I am having issues getting the result I am looking for. I run:</p>
  <pre><code>const web3 = require('@solana/web3.js');
  
  (async () =&gt; {
    const solana = new web3.Connection(&quot;https://api.mainnet-beta.solana.com&quot;);
  
  //the public solana address
    const accountPublicKey = new web3.PublicKey(
      &quot;2B1Uy1UTnsaN1rBNJLrvk8rzTf5V187wkhouWJSApvGT&quot;
    );
  
  //mintAccount = the token mint address
    const mintAccount = new web3.PublicKey(
      &quot;GLmaRDRmYd4u3YLfnj9eq1mrwxa1YfSweZYYZXZLTRdK&quot;
    );
    console.log(
      await solana.getTokenAccountsByOwner(accountPublicKey, {
        mint: mintAccount,
      })
    );
  })();
  </code></pre>
  <p>I'm looking for the token account address in the return, 6kRT2kAVsBThd5cz6gaQtomaBwLxSp672RoRPGizikH4. I get:</p>
  <blockquote>
  <p>{   context: { slot: 116402202 },   value: [ { account: [Object],
  pubkey: [PublicKey] } ] }</p>
  </blockquote>
  <p>I can drill down through this a bit using .value[0].pubkey or .value[0].account but ultimately can't get to the information i'm looking for, which is a return of 6kRT2kAVsBThd5cz6gaQtomaBwLxSp672RoRPGizikH4</p>
  <p>Does anyone know what is going wrong?
  (Note I do not want to use the getOrCreateAssociatedAccountInfo() method, i'm trying to get the token account address without handling the wallets keypair)</p>