title: Display local JSON file data in a chart in Asp.net MVC
body: <p>I'm working with JSON manipulation in ASP.NET MVC for the first time, therefore facing few problems. What I want to do is:</p>
  
  <p>1) Read all the data from local JSON file using C# MVC, and
  2) Then display the required fetched data using any chart / graph.</p>
  
  <p>Controller Code:</p>
  
  <pre><code>    public class MoviesController : Controller
          {
     public ActionResult Index()
          {
              using (StreamReader sr = new StreamReader(Server.MapPath("~/App_Data/Genres.json")))
              {
                  var jsonResult = JsonConvert.DeserializeObject&lt;List&lt;Genres&gt;&gt;(sr.ReadToEnd());
  
              return View(jsonResult);
  
          }
      }
  
      public ActionResult Movies()
      {
          using (StreamReader sr = new StreamReader(Server.MapPath("~/App_Data/Movies.json")))
          {
              var json = JsonConvert.DeserializeObject&lt;List&lt;Movies&gt;&gt;(sr.ReadToEnd());
              return View(json);
          }
      }
  </code></pre>
  
  <p>Genres.cs :</p>
  
  <pre><code>public class Genres
      {
          public int id { get; set; }
          public string name { get; set; }
      }
  </code></pre>
  
  <p>Movies.cs :</p>
  
  <pre><code>public class Movies
      {
          public string Overview { get; set; }
          public DateTime ReleaseDate { get; set; }
          public Array GenreIDs { get; set; }
          public int MovieID { get; set; }
          public string OriginalTitle { get; set; }
          public string OriginalLanguage { get; set; }
          public string Title { get; set; }
          .
          .
          .
      }
  </code></pre>
  
  <p>Genres.json:</p>
  
  <pre><code>[{
                  "id": 28,
                  "name": "Action"
              }, {
                  "id": 12,
                  "name": "Adventure"
              }, {
                  "id": 16,
                  "name": "Animation"
              }, {
                  "id": 35,
                  "name": "Comedy"
              }, {
                  "id": 27,
                  "name": "Horror"
              }, {
                  "id": 10402,
                  "name": "Music"
              }, {
                  "id": 9648,
                  "name": "Mystery"
              }, {
                  "id": 10749,
                  "name": "Romance"
              }
          ]
  </code></pre>
  
  <p>Movies.json: 
  [{</p>
  
  <pre><code>            "overview": "Raj is a rich, carefree, happy-go-lucky second generation NRI. Simran is the daughter of Chaudhary Baldev Singh, who in spite of being an NRI is very strict about adherence to Indian values. Simran has left for India to be married to her childhood fiancé. Raj leaves for India with a mission at his hands, to claim his lady love under the noses of her whole family. Thus begins a saga.",
              "release_date": "1995-10-20",
              "genre_ids": [35, 18, 10749],
              "id": 19404,
              "original_title": "Dilwale Dulhania Le Jayenge",
              "original_language": "hi",
              "title": "Dilwale Dulhania Le Jayenge",
          }, {
              "overview": "Framed in the 1940s for the double murder of his wife and her lover, upstanding banker Andy Dufresne begins a new life at the Shawshank prison, where he puts his accounting skills to work for an amoral warden. During his long stretch in prison, Dufresne comes to be admired by the other inmates -- including an older prisoner named Red -- for his integrity and unquenchable sense of hope.",
              "release_date": "1994-09-23",
              "genre_ids": [18, 80],
              "id": 278,
              "original_title": "The Shawshank Redemption",
              "original_language": "en",
              "title": "The Shawshank Redemption",
          }, {
              "overview": "The true story of how businessman Oskar Schindler saved over a thousand Jewish lives from the Nazis while they worked as slaves in his factory during World War II.",
              "release_date": "1993-11-29",
              "genre_ids": [18, 36, 10752],
              "id": 424,
              "original_title": "Schindler's List",
              "original_language": "en",
              "title": "Schindler's List",
          }
  ]
  </code></pre>
  
  <p>This is the updated code in which I have successfully read the JSON files of Genre and Movies. Now what I want to do is to show the data of these JSON files in the form of charts (pie, bar etc) and then apply some filters as well. How can I do that? Thanks in advance.</p>