title: Add multiple items in JSON array to object in C# using Json.net
body: <p>Can anyone tell me how I can deserialize an object that contains multiple attributes?</p>
  
  <p>Given the scenario below, the code works fine.</p>
  
  <pre><code>public ActionResult Index()
  {
      string json = @"{""name"": ""Person 2"",""email"": ""example@example.com""}";
  
      var emp = JsonConvert.DeserializeObject&lt;Person&gt;(json);
      Response.Write(emp.name + emp.email);
      return View();
  }
  
  public class Person
  {
      public string name { get; set; }
      public string email { get; set; }
  }
  </code></pre>
  
  <p>But what do I have to do if the array contains multiple items, e.g </p>
  
  <pre><code>string json = @"{""data"": [{""name"": ""Person 1"",""email"": ""test@test.com""},{""name"": ""Person 2"",""email"": ""example@example.com""}]}";
  </code></pre>
  
  <p>Thanks in advance</p>
  
  <p>The answers already given below were perfect for the problem I asked, but now I've gone one step ahead. Can anyone advise on what I'd need to do if the json had an array in it e.g. the addition of an address in?</p>
  
  <pre><code>{
      "data": [
          {
              "name": "Person 1",
              "email": "test@test.com",
              "address": {
                  "address1": "my address 1",
                  "address2": "my address 2" 
              } 
          },
          {
              "name": "Person 2",
              "email": "example@example.com",
              "address": {
                  "address1": "my address 1",
                  "address2": "my address 2" 
              } 
          } 
      ] 
  }
  </code></pre>