title: Read settings contained in a json file in javascript
body: <p>Im tring to read a simple setting from a json file, the json is this :</p>
  
  <pre><code>{
    "Label": "some string here"
  }
  </code></pre>
  
  <p>form my javascript part i do:</p>
  
  <pre><code>import settings from '../settings.json';
  </code></pre>
  
  <p>then:</p>
  
  <pre><code>  var settings= ()=&gt; { 
        const headers = new Headers();
        const requestOptions = {
            method: 'GET',
            headers: { ...headers.authentication, ...headers.culture, 'ContentType':'application/json',
            };
      return fetch(`${settings.Label}`, requestOptions).then(() =&gt; {
             return response.text().then(text =&gt; {
                    const data = text ? text &amp;&amp; JSON.parse(text) : {};
                    let token = response.headers.get('X-Token');
                    if (token) {
                        data.token = token;
                    }
                    if (!response.ok) {
                       // manage error here
                    }
                    return Promise.reject(error);
             }
            return data;
          })
        });
      };
      // use settings here
  </code></pre>
  
  <p>Despite my many searches and attempts  im not very expert in javascript,i have tried in many ways before, but the my variable 'settings' is not contain nothing.</p>