Learn Courses My Dashboard

Mixed Fraction in json

Hey with the recipe app, I am currently working my own recipes and there is a value that requires 1 2/3 cups.

What would be the best way to add this to the updated json file
{"name": "Arborio rice", "num": 3, "denom": 2, "unit": "cup"},
Would we put “num”: 1, “num”: 1, “demon”:3 ?

Store it as 5/3 and adjust it to 1 2/3 when you display to the user.

1 Like

Thanks! I was just going to try that.