# format numeric string

**URL:** <https://community.hubspot.com/t/format-numeric-string/146895>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [March 3, 2026, 6:19pm UTC](https://community.hubspot.com/t/format-numeric-string/146895 "2026-03-03T18:19:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aemmi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aemmi/32/84335_2.png) [@aemmi](https://community.hubspot.com/u/aemmi)\
**Post date:** [March 3, 2026, 6:19pm UTC](https://community.hubspot.com/t/format-numeric-string/146895/1 "2026-03-03T18:19:56Z")

</div>

I’m retrieving changed data through the /crm/v3/objects/0-3/search api. The body I’m sending is

{“after”: “0”,  
“limit”: 100,  
“sorts”: [“lastmodifieddate”  
],“properties”: [  
“deal\_customer\_number”,  
“opp\_account\_number”,  
“opportunity\_id”,  
“closed\_lost\_reason”,  
“closedate”,  
“createdate”,  
“dealname”,  
“dealstage”,  
“description”,  
“product\_type”,  
“source”,  
“hs\_deal\_stage\_probability”,  
“hs\_projected\_amount”,  
“hubspot\_owner\_id”,  
“expected\_close\_date”,  
“forecast”,  
“gm”],  
“filterGroups”: [  
{“filters”: [  
{“propertyName”: “hs\_lastmodifieddate”,  
“value”: “2026-03-03T16:50:02Z”,  
“operator”: “GT”  
},“propertyName”: “pipeline”,  
“value”: “default”,  
“operator”: “EQ”}]}]}

The problem is I’m receiving data back like below. Is there anyway of limiting the number of decimal places it returns for hs\_deal\_stage\_probability and hs\_projected\_amount

“id”: “56284170888”,  
“properties”: {  
“closed\_lost\_reason”: null,  
“closedate”: null,  
“createdate”: “2026-02-05T13:49:33Z”,  
“deal\_customer\_number”: “1118276”,  
“dealname”: “01.16.2026 1220 EXHIBITS AXS 195959”,  
“dealstage”: “qualifiedtobuy”,  
“description”: “01.16.2026 1220 EXHIBITS AXS 195959”,  
“expected\_close\_date”: “2026-05-01”,  
“forecast”: “11950”,  
“gm”: “.4054”,  
“hs\_deal\_stage\_probability”: “0.299999999999999988897769753748434595763683319091796875”,  
“hs\_lastmodifieddate”: “2026-03-03T18:02:19.199Z”,  
“hs\_object\_id”: “56284170888”,  
“hs\_projected\_amount”: “3584.999999999999867328348557293793419376015663146972656250”,  
“hubspot\_owner\_id”: “32613012”,  
“opp\_account\_number”: “61276”,  
“opportunity\_id”: “62864”,  
“product\_type”: null,  
“source”: null  
},

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 3, 2026, 11:31pm UTC](https://community.hubspot.com/t/format-numeric-string/146895/2 "2026-03-03T23:31:34Z")

</div>

Hi @aemmi,

Unfortunately, there isn’t a way to format the values for properties such as “hs\_deal\_stage\_probability” or “hs\_projected\_amount” in the payload that is returned by the API. The response will always return raw values.

You would need to extract the values from the payload and process them via code.

Simple example to round “hs\_deal\_stage\_probability” value to two decimal points using javascript

```lia-code-sample
const probability = parseFloat(deal.properties.hs_deal_stage_probability);
const roundedProbability = Number(probability.toFixed(2));

```

This would turn “0.299999999999999988897769753748434595763683319091796875” into “0.30”

Hope this helps

---

<div class="post-metadata">

**Author:** ![aemmi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aemmi/32/84335_2.png) [@aemmi](https://community.hubspot.com/u/aemmi)\
**Post date:** [March 4, 2026, 4:11pm UTC](https://community.hubspot.com/t/format-numeric-string/146895/3 "2026-03-04T16:11:54Z")

</div>

Thank you for your reply
