title: Passing json object from one js file to another js file
body: <p>I have a js file X which has a json object in which I want to pass the object to another js file Y and execute according to the values of the object. These two js files are referenced to the same html page.</p>
  
  <p>The json object is something like this</p>
  
  <pre><code>var displayDetails = {
      "A" :   {
                  data : "1",
                  display : "A1"
          },
      "B" :   {
                  data : "2",
                  display : "B2"
          }
  };
  </code></pre>
  
  <p>After which the json object was parsed </p>
  
  <pre><code>var cachedOptions = JSON.parse(JSON.stringify(displayDetails));
  </code></pre>
  
  <p>All this are in js file X. So how do I access that cachedOptions or displayDetails on js B? I am new to json so any help is appreciated. Thanks!</p>