I was presented with the following string:
result:tie,player:paper,computer:paper
One way to handle this could be splitting it into arrays, creating an object, and parsing it. However, this approach may not be ideal.
Is there a better method to convert this string into an object?
let string = "result:tie,player:paper,computer:paper"