title: How to match a JSON response value to Postman environment variable?
body: <p>If an environment variable is set in Postman, for example year, then I'd like to check if the JSON response for the field birthYear matches the value of the variable.</p>
  
  <p>I am trying with the following test:</p>
  
  <pre><code>var jsonData = JSON.parse(responseBody);
  tests['Contents'] = environment.year === jsonData.birthYear; 
  </code></pre>
  
  <p>This test always fails. birthYear is 1910 and year is also 1910.</p>
  
  <p>If I try the same test but for a field that has a string value then it works correctly - pass when the values match and fail when they don't.</p>
  
  <p>How should I proceed in order to test the integer values as well as the string ones?</p>