Answer the question
In order to leave comments, you need to log in
Cannot access child value on Newtonsoft.Json.Linq.JProperty c# how to fix?
Please help with a bug:
I wanted to make a parser for the number of subscribers of the VK group, here is the code:
URI3 = "https://api.vk.com/method/groups.getMembers?group_id=208032066&v=5.81&offset=0&access_token=fbaa5375055f5273104712&&&&&&&&&&&&&&&&&&&&&&&";
result3 = webclient3.DownloadString(URI3);
Console.WriteLine(result3);
int countofmembers = 0;
int ofset = 0;
var msgcol = JObject.Parse(result3)["response"].ToList();
foreach (var item in msgcol)//проходимся по коллекции.
{
countofmembers = Convert.ToInt32(item["count"].ToString());
double rond = countofmembers / 1000;
ofset = (int)Math.Round(rond, 0);
Console.WriteLine(ofset);
}
var msgcol = JObject.Parse(result3)["response"].ToList();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question