title: Accessing JSON by using a constant
body: <p>My JSON looks as following:</p>
  
  <pre><code>{
      flight_number: 1,
      mission_name: "FalconSat",
      rocket: {
          rocket_id: "falcon1",
          rocket_name: "Falcon 1",
          rocket_type: "Merlin A",
          first_stage: {
              cores: [
                  {
                      core_serial: "Merlin1A",
                      flight: 1
                  }
              ]
          },
          fairings: {
              reused: false,
              recovery_attempt: false,
              recovered: false,
              ship: null
          }
      },
      links: {
          video_link: "https://www.youtube.com/watch?v=0a_00nJ_Y88",
          flickr_images: [ ]
      },
      details: "Engine failure at 33 seconds and loss of vehicle"
  }
  </code></pre>
  
  <p>To access the video link, I want to use a constant and I've been trying to use:</p>
  
  <pre><code>const links = "links";
  const video1 = links + ".video_link";        // this doesn't work 
  const video2 = "links.video_link";           // this doesn't work
  const det = "details";
  
  getVideoURL(something) {
      console.log(something.video1);           // undefined
      console.log(something.links.video_link); // this works
      console.log(something.det);              // this works
  
      return something.video2;
  }
  
  getDetails(something) {
      return something.det;                    // this works
  }
  
  // the jsonObject is retrieved by an async function, i just simplified it. I hope this makes sense.
  const jsonObject = await axios("https://api.spacexdata.com/v3/launches");
  
  let url = getVideoURL(jsonObject);
  let det = getDetails(something);
  
  console.log(url)                             // undefined
  console.log(det)                             // prints out details.
  </code></pre>
  
  <p>Is there a way I can get the video URL like how I've done it with <code>getDetails</code> by using <code>return something.video1</code> or <code>return something.video2</code>?</p>