I would use a simple string comparison here, as far as I know there is no built in function for what you want to do (unless you want to resort to eval… which you don’t).
var myBool = myString == "true";
I would use a simple string comparison here, as far as I know there is no built in function for what you want to do (unless you want to resort to eval… which you don’t).
var myBool = myString == "true";