I have the following variable of type {Newtonsoft.Json.Linq.JArray}.
properties[\"Value\"] {[
{
\"Name\": \"Username\",
\"Selected\":
I can think of different method to achieve the same
IList result= array;
or (i had some situation that this one didn't work well)
var result = (List) array;
or use linq extension
var result = array.CastTo>();
or
var result= array.Select(x=> x).ToArray();
or more explictly
var result= array.Select(x=> new SelectableEnumItem{FirstName= x.Name, Selected = bool.Parse(x.selected) });
please pay attention in above solution I used dynamic Object
I can think of some more solutions that are combinations of above solutions. but I think it covers almost all available methods out there.
Myself I use the first one