From AWS lambda, I'm getting and passing data to Stream Processor which is coming from IOT devices using Node.JS code. The data needs to be either in float or double otherwise Stream Processor rejects the incoming data from lambda. Sometimes IOT devices are giving data in integer format like 50, 1180. So I do need to convert that integer data into floating point values.
I've used toFixed() function which adds zero after decimal point if value is integer but returns value in String format. And if we again convert the string into float, all zeros after decimal point disappear. I need to somehow add decimal point and zeros after integer value and data type should also not be in String or Int.