title: Convert All String Values of an Object to Lowercase Javascript
body: <p>I would like to take an array of objects that contains string and numeric values and convert all string values to lowercase. I don't know ahead of time what specific values my array objects will have, so I just want to first check if an object within the array contains a string, and then make that string lowercase. When I run the following, I get an error.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let data = [{
      userId: 1234567890,
      errorId: 957,
      userCategory: "Category",
      userAge: 18,
      userType: "Standard"
    },
    {
      userId: 1234567890,
      errorId: 583,
      userCategory: "Second",
      userAge: 28,
      userType: "Superuser"
    },
    {
      userId: 1234567890,
      errorId: 823,
      userCategory: "Third",
      userAge: 38,
      userType: "Admin"
    }
  ]
  
  let newData = data.map(x =&gt; x.toLowerCase());
  
  console.log(newData) //data is not a function</code></pre>
  </div>
  </div>
  </p>