Shopify — Liquid, Convert string to integer

Dealing with my latest project’s issues, I realize that, Liquid seems to be treating the metafield as a string even though the API confirms the metafield is an integer. So if you want to convert a metafield value into integer value, you may have to use this snippet code: