title: How to extract the values from the response body in postman
body: <p>After posting the request, API return response body as string </p>
  
  <p>Response body look like</p>
  
  <blockquote>
    <p>{ UniqueID = 93243434,birthGender = M,birthDate = 11/1/2018 5:51:18
    PM,  familyNames = James, givenNames = Test }</p>
  </blockquote>
  
  <p>when I try to set the environment variable using the below code</p>
  
  <pre><code>var data = JSON.parse(responseBody);
  postman.setEnvironmentVariable("currentUniqueId", data.UniqueId);
  </code></pre>
  
  <p>I got the below error on test results</p>
  
  <blockquote>
    <p>Error message:
    There was an error in evaluating the test script:  JSONError:
    Unexpected token 'U' at 1:3 { UniqueID = 93243434,birthGender =
    M,birthDate = 11/1/2018 5:51:18 PM, family ^</p>
  </blockquote>
  
  <p>my goal is I need to extract the value 93243434 and assign to environment variable. </p>