title: React JS - How to pass variables (parameters) when using a local JSON file?
body: <p>My page is consuming data from an API/JSON and passes <strong>two parameters</strong> via the API URL:</p>
  
  <p>The code:   </p>
  
  <pre><code>fetchSegments(building, reselect) {
      const bearerToken = this.getToken();
  
      const simulations = filter(simulationJson, { clientName: building.clientName}/ ${building.siteName} )
  
      //fetch(`theapiurl.net/api/simulations/${building.clientName}/${building.siteName}`, {
      // method: 'GET',
      // headers: {
      //            'Content-type': 'application/json',
      //            'Authorization': `Bearer ${bearerToken}`
      //           },
      //      })
      //     .then(response =&gt; {
      //       if(!response.ok &amp;&amp; response.status === 404) {
      //         this.setState({ segments: [], selected: undefined })
      //        return Promise.reject(response);
      //       }
      //       return response.json();
      //     })
      //     .then(simulation =&gt; {
      //         let selectIndex = 0;
      //         if(reselect) {
      //           selectIndex = this.state.selected;
      //        }
      this.setState({ segments: simulation.segments, selected: selectIndex })
      this.props.onSelect(simulation.segments[selectIndex], reselect)
      //   })
    }
  </code></pre>
  
  <p>I currently have to consume the JSON file locally and so I commented out the bits of code in the above snippet, but I get a syntax error when trying to append the second parameter:</p>
  
  <pre><code>const simulations = filter(simulationJson, { clientName: building.clientName}/ **${building.siteName**} )
  </code></pre>
  
  <p>I was able to fix the syntax issue in another file that uses only one parameter, but having issues when it comes to passing two. ...could I get some help with this please</p>