My JSON object is causing issues because it has True instead of true and False instead of false. How can I fix this problem? The code snippet below shows that obj2 is not working properly due to boolean values being capitalized.
<!DOCTYPE html>
<html>
<body>
<h2>Creating an Object from a JSON String</h2>
<p id="demo1"></p>
<p id="demo2"></p>
<script>
const txt1 = '{"device_state": {"device_name": "iPhone", "is_phone": true, "is_VOX": false}}'
const obj1 = JSON.parse(txt1);
document.getElementById("demo1").innerHTML = obj1.device_state.device_name
const txt2 = '{"device_state": {"device_name": "iPhone", "is_phone": True, "is_VOX": false}}'
const obj2 = JSON.parse(txt2);
document.getElementById("demo2").innerHTML = obj2.device_state.device_name
</script>
</body>
</html>