FAQ: How do I remove leading zeroes from field values with a handlebars expression?

Question: I have an ID field with values that have zeros prepended to the ID number. For example:

"id" : "0000000451"

Is there a handlebars expression that will remove the leading zeros while preserving the actual values?

Answer: Yes, you can use the following regexReplace handlebars expression:

{{regexReplace id "" "^0+" "g"}}

For more information on regexReplace, see Handlebars helper reference.