String to Boolean : <p>I've read numerous examples converting from String to Boolean.</p>

<p>For example,</p>

<p>myString = (myString == "true");</p>

<p>But I'm unable to apply the logic to my code. Can someone help?</p>

<blockquote>
  <p>CommonConfig.getFeatureFlags['analytics.demo'] returns "true" (Note
  the "").(That's how backend returns it)</p>
</blockquote>

<pre><code>var FeatureFlag = _.extend(CommonConfig, {
    demoFeature: String == CommonConfig.getFeatureFlags['analytics.demo'], //either "true" or "false" but I want to make it to true or false
});
</code></pre>

<p>Question: I want to convert from String "true" to boolean. And pass true or false based upon!</p>

<p>Can someone help?</p>
