Below is an example of a JavaScript object along with some code:
buildingJson: {
name: "build",
height: 40
}
var val = parseFloat(buildingJson.height).toFixed(2);
buildingJson.height = val;
console.log(typeof buildingJson.height);
Despite the value being 40.0, it always logs out as a string.
How can the height be set to a floating point number in the buildingJson object?