string true a boolean code example
Example 1: js string to boolean
// Do
var isTrueSet = (myValue == 'true');
// Or
var isTrueSet = (myValue === 'true');
Example 2: javascript true string to boolean
var isHidden='true';
var isHiddenBool = (isHidden == 'true');