# Unexpected token in JSON for Booleans

**URL:** <https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [April 13, 2026, 2:15pm UTC](https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715 "2026-04-13T14:15:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [April 13, 2026, 2:15pm UTC](https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715/1 "2026-04-13T14:15:45Z")

</div>

Trying to add 5 Boolean values into my script using JSON, but for some reason the result isn’t true or false, but x or a checkmark. Is there a way to fix this. And is the syntax ok of line 2?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/9/19677922fb36cd899ace8f8bf9501fdc5229cad0.png)

Have been trying to figure this our for a few hours yesterday, but no luck yet.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [April 13, 2026, 2:25pm UTC](https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715/2 "2026-04-13T14:25:51Z")

</div>

For some inexplicable reason, the Athom developers thought it would make sense for boolean tags in flows to render to “⨯” and “✓”, instead of something logical like “false/true” or even “0/1” 🤷🏼‍♂️

Which means you need to put quotes around them in the JSON argument, and explicitly check for those two characters in your code.

---

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [April 13, 2026, 3:09pm UTC](https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715/3 "2026-04-13T15:09:57Z")

</div>

Thanks Robert that helps a lot! The only thing now is to get my value ‘Waarde’ to increase, but that doesn’t seem to happen. Any clues?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/2/82223b2204530c7e2a015214ad203eb81e1610e1.png)

Tried also only the Checkmark and Case 1, Waarde.tostring and Case “1” etc.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [April 13, 2026, 3:22pm UTC](https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715/4 "2026-04-13T15:22:21Z")

</div>

The equality operator in JS is `==`, not `=`:

```auto
if (slp == "common.✓") { Waarde += 1; }

```

Although from what I saw, the value is `✓`, not `common.✓`

---

<div class="post-metadata">

**Author:** ![Lacobo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lacobo/32/154741_2.png) [@Lacobo](https://community.homey.app/u/Lacobo)\
**Post date:** [April 13, 2026, 6:28pm UTC](https://community.homey.app/t/unexpected-token-in-json-for-booleans/153715/5 "2026-04-13T18:28:17Z")

</div>

Thanks! It’s finally working.

```auto
let {slp, bed, bad, kst, gas} = JSON.parse(args[0]);
let Waarde = 0;
if (slp == "✓") {Waarde += 1};
if (bed == "✓") {Waarde += 2};
if (bad == "✓") {Waarde += 4;}
if (kst == "✓") {Waarde += 8;}
if (gas == "✓") {Waarde += 16;}

switch (Waarde) {
 case 1:

```
