I have a NodeJS Express Code that is simply passing data from client to my back end server in request-response format. Now My client is expecting the dollar amounts in the JSON response as double datatype. How do I do it dynamically. For example below,
var data =   [
{
   "feeType":"Trip",
   "feeCategory":"Transaction",
   "feeAmount":0,
   "isApplicable":true,
   "isRequired":true,
   "applicableDeliveryType":"None",
   "appliedFeeAmount":0
},
{
   "feeType":"FerryFee",
   "feeCategory":"Passenger",
   "feeAmount":2,
   "isApplicable":true,
   "isRequired":false,
   "applicableDeliveryType":"None",
   "appliedFeeAmount":2
},
{
   "feeType":"WillCall",
   "feeCategory":"Service",
   "feeAmount":0,
   "isApplicable":false,
   "isRequired":false,
   "applicableDeliveryType":"Pickup",
   "appliedFeeAmount":0
},
{
   "feeType":"NotTravelling",
   "feeCategory":"Service",
   "feeAmount":0,
   "isApplicable":false,
   "isRequired":false,
   "applicableDeliveryType":"PrintAtHome",
   "appliedFeeAmount":0
},
{
   "feeType":"Pickup",
   "feeCategory":"Delivery",
   "feeAmount":0,
   "isApplicable":false,
   "isRequired":false,
   "applicableDeliveryType":"None",
   "appliedFeeAmount":0
},
{
   "feeType":"PrintAtHome",
   "feeCategory":"Delivery",
   "feeAmount":0,
   "isApplicable":false,
   "isRequired":false,
   "applicableDeliveryType":"None",
   "appliedFeeAmount":0
}
]
My Client is expecting as the number values with .0 or decimal numbers. How can I do that?
 
    