Let us say that I have an enum:
enum XYZ { addition, updation, remove}
and I have a result string that I get using fromJson method which returns addition, updation or remove
How do I write a function so that these values get converted into the enum values. Something like XYZ.json['result'] which should return me XYZ.addition or XYZ.updation and so on
Any help would be really appreciated.