Open vrbb opened 2 years ago
Create function to calculate the value of a play from a JSON. Example:
[ { "costumer" : "BigCo", "performaces" : [ { "playID" : "hamelet", "audience" : "55", }, { "playID" : "as-like", "audience" : "35", }, { "playID" : "othello", "audience" : "40", }, ] } ]
Using the formula:
(audience * 1000) / type_play
where:
{ "type_play" : { "tragedy" : 40, "comedy" : 60 } }
Create function to calculate the value of a play from a JSON. Example: