# How get multiple choice values

**URL:** <https://community.hubspot.com/t/how-get-multiple-choice-values/73048>\
**Category:** CMS Development\
**Created:** [January 17, 2023, 11:07am UTC](https://community.hubspot.com/t/how-get-multiple-choice-values/73048 "2023-01-17T11:07:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RJChauhan](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@RJChauhan](https://community.hubspot.com/u/RJChauhan)\
**Post date:** [January 17, 2023, 11:07am UTC](https://community.hubspot.com/t/how-get-multiple-choice-values/73048/1 "2023-01-17T11:07:38Z")

</div>

I have choice field which is multiple selecting , but I need the value one by one like following are my choices

 ![RJChauhan_0-1673953575488.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/c/6c4ad6102a01aaa268c737d1b777324313ebd105.png)

**and I need to get values like this (“h1, h2, h3, h4”)**

---

<div class="post-metadata">

**Author:** ![Bryantworks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bryantworks/32/94963_2.png) [@Bryantworks](https://community.hubspot.com/u/Bryantworks)\
**Post date:** [January 17, 2023, 1:06pm UTC](https://community.hubspot.com/t/how-get-multiple-choice-values/73048/2 "2023-01-17T13:06:51Z")

</div>

Hey @RJChauhan, for Multicheckbox fields like this HubSpot has them as semi colon delimited. You’d need to run a bit of custom code to transform this data like you want.

```lia-code-sample
// Create a variable to store the string
let str = "apple;orange;banana;grapes;pineapple";

// Use the replace() method to replace the semicolons with a comma and space
let newStr = str.replace(/;/g, ", ");

// Print the transformed string
console.log(newStr); // Output: apple, orange, banana, grapes, pineapple

```

---

<div class="post-metadata">

**Author:** ![RJChauhan](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@RJChauhan](https://community.hubspot.com/u/RJChauhan)\
**Post date:** [January 18, 2023, 4:32am UTC](https://community.hubspot.com/t/how-get-multiple-choice-values/73048/3 "2023-01-18T04:32:06Z")

</div>

@BryantworksThanks, yes I already did with JS but I need the solution with HUBL. What happpen when I need values sepratly one by one , @hubspot must give the solution for this

---

<div class="post-metadata">

**Author:** ![S2-StvSimons](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@S2-StvSimons](https://community.hubspot.com/u/S2-StvSimons)\
**Post date:** [January 18, 2023, 6:12pm UTC](https://community.hubspot.com/t/how-get-multiple-choice-values/73048/4 "2023-01-18T18:12:16Z")

</div>

As noted a checkbox value is a semicolon string. Most cases depending on what you are wanting to do you’ll coerce that into an array with a split(), or if you are simply wanting to replace the semicolon’s you can use a replace() filter:

```lia-code-sample
{{ "Apples;Oranges;Limes"|split(';')|join(', ') }}<br>
{{ "Apples;Oranges;Limes"|replace(';', ', ') }}

```

Apples, Oranges, Limes

Apples, Oranges, Limes
