You'll loose any decimal places because floats and ints are both type `number`. parseFloat(data, 10) would cover cases.