React - Remove decimal points with parseInt

0 votes
214 views
added Jun 11, 2020 in React by lcjr First Warrant Officer (11,930 points)
const listingPsf = get(data, 'field_prop_built_up_price_pu_d', '-');


// To use
{listingBuiltUp} sqft · RM {`${parseInt(listingPsf, 10)}`} psf

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...