// Original price
var price = '$2.968.945'
// remove $ and .
price = price.replace(/\$/g,'').replace(/\./g,'')
// convert to Int
price = parseInt(price)
// Divide by 1000 and truncate to remove extra digits
price = Math.trunc(price/1000)
// Format the final price
price = price*1000-10
// Price output --> 2967990