I have following Json
[{"id":1,"role":"Admin"},{"id":2,"role":"Manager"},{"id":3,"role":"User"}]
I want to iterate this and add to my custom class array which has same properties (id,role,ischecked) in angular typescript.
My Custom class
class Roles{
ID:number;
Role:string;
Checked:Boolean;
}
How can i achieve it?