I've finally resolved this problem thanks with the help of @Newton Sheikh. Thank you first of all.
First I created a class (Student)
public class Student
{
public string Response { get; set; }
public string UUID { get; set; }
}
Then I imported the JSON.NET and created a function:
public List<Student> ReturnAllStudentsList()
{
string jsonString = "[{'Response':'OK','UUID':'89172'},{'Response':'OK','UUID':'10304'}]";
List<Student> Students = new List<Student>(); //Creates a list of custom Type: Student
var result = JsonConvert.DeserializeObject<List<Student>>(jsonString);
foreach (var student in result)
{
Students.Add(student);
}
return Students;
}
From this point, I have a list of Students. Then in my main program, I call this function:
private void button1_Click(object sender, EventArgs e)
{
List<Student> Students = ReturnAllStudentsList(); // Gets the list from JSON.
foreach(Student student in Students)
{
// Here I can access to each student for every loop cycle.
MessageBox.Show(student.Response);
}
}
Thank you @Newton Sheikh and others help! I hope this example code can help others too! Cheers.