im very new to reactNative development. and trying to compare two strings.
ex:
response["Result"] equalsTo "True"
i tried using == , toEqual but didnt work.
Updated
im getting JSON Response like this
{ Result: true,
Message: 'Login Success.',
Code: 'Login Code' }
when i console.log(response["Result"]) it prints true.
but when i compare. it always go to the else part.
if(response["Result"] == "true"){
console.log("SUCCESS");
}else{
console.log("ERROR");
}
==?trueis not the same as"true".