6
Ubah Newtonsoft.Json.Linq.JArray ke daftar jenis objek tertentu
Saya memiliki variabel tipe berikut {Newtonsoft.Json.Linq.JArray}. properties["Value"] {[ { "Name": "Username", "Selected": true }, { "Name": "Password", "Selected": true } ]} Yang ingin saya capai adalah untuk mengonversikan ini ke List<SelectableEnumItem>tempat SelectableEnumItemadalah tipe berikut: public class SelectableEnumItem { public string Name { get; set; } public bool Selected { get; …