This script reads BMI Data from BMIData.json
file, calculates BMI, and also outputs weight and risk profile.
The file should have specific format of data. This script requires data in format of JSON array with properties mentioned as below.
{Gender:string;HeightCm:number;WeightKg:number}[]
The script adds BMI, BMICategory (weight) and BMIHealthRisk data on input.
The output will be written into BMIOutput.json
file in below format.
{Gender:string;HeightCm:number;WeightKg:number;BMI:number;BMICategory:string;BMIHealthRisk:string;}
Please run npm run test
script to run tests.