I got the Json \"false\" from server. I respond as bool but it\'s Json so it\'s in browser type is String instead of bool
To compare string and Boolean in JavaScript, let us see the following examples. It returns true:
false == "0"; //true
true == "1"; //true
false == ""; //true
The followings returns false:
false == "false"; //false
true == "true"; //false
In addition, try the following example too:
var data = true;
data === "true" //false
String(data) === "true" //true
https://www.tutorialspoint.com/How-do-I-compare-String-and-Boolean-in-JavaScript