JavaScript - Table data interpolation