I have this JSON string:
string json=@"['Apple','Mango','Orange']";
I have the following enum:
public enum Fruits
{
Apple=1,
Mango=2,
Orange=3
}
I want to deserialize it such that it gives the corresponding array of enums.
int[] result= JsonConvert.Derserialize<int[]>(json)// I want results as [1,2,3]