Newtonsoft.Json.Linq.JArray to string array C#

I have a JSON Array like

model.Users =  ["Joe","Barny","Power","Tester"]

the model is dynamic

I want to convert model.Users to string[] Users

string[] Users = model.Users 

How can I do that?


Solution 1:

If model.Users is of type Newtonsoft.Json.Linq.JArray try to call:

string[] Users = model.Users.ToObject<string[]>()