title: How do I compare strings in ReactNative?
body: <p>im very new to reactNative development. and trying to compare two strings.</p>
  <p>ex:
  <code>response[&quot;Result&quot;] equalsTo &quot;True&quot;</code></p>
  <p>i tried using <code>==</code> , <code>toEqual</code> but didnt work.</p>
  <h2>Updated</h2>
  <p>im getting JSON Response like this</p>
  <pre><code>{ Result: true,
    Message: 'Login Success.',
    Code: 'Login Code' }
  </code></pre>
  <p>when i <code>console.log(response[&quot;Result&quot;])</code> it prints <code>true</code>.</p>
  <p>but when i compare. it always go to the else part.</p>
  <pre><code>if(response[&quot;Result&quot;] == &quot;true&quot;){
      console.log(&quot;SUCCESS&quot;);
  }else{
      console.log(&quot;ERROR&quot;);
  }
  </code></pre>