title: Parsing json file in c# to get into all sections and properties
body: <p>==========Update</p>
  <p>So in trying to phrase the issue properly, I have misled the responders in not giving me the answer I need. Apologies, let me try to clarify.</p>
  <p>I need to be able to cycle through a json file that is not as structured as I indicated in the OP, it is much more random. The OP file did not convey that very well.</p>
  <p>Let me try to describe what is closer to the file I'll be getting. The first two levels will be fixed, I'll call them LevelA and LevelB. But the properties in LevelB can be any pair of random data. This is a better json file example:</p>
  <pre><code>{
    &quot;LevelA&quot;: {
      &quot;LevelB&quot;: [
        {
          &quot;EmpName&quot;: &quot;John&quot;,
          &quot;EmpGender&quot;: &quot;Male&quot;,
          &quot;Age&quot;: &quot;25&quot;
        },
        {
          &quot;FavoriteFood&quot;: &quot;Beer&quot;,
          &quot;BaseballTeam&quot;: &quot;Kansas City Royals&quot;
        },
        {
          &quot;Red&quot;: &quot;10&quot;,
          &quot;Blue&quot;: &quot;40&quot;,
          &quot;White: &quot;True&quot;
        }
      ]
    }
  }
  </code></pre>
  <p>Say I need to write out the following to console:</p>
  <pre><code>A LevelB entry has these properties:
  Property: EmpName, Value: John
  Property: EmpGender, Value: Male
  Property: Age, Value: 25
  
  A LevelB entry has these properties:
  Property: FavoriteFood, Value: Beer
  Property: BaseballTeam, Value: Kansas City Royals
  
  A LevelB entry has these properties:
  Property: Red, Value: 10
  Property: Blue, Value: 40
  Property: White, Value: True
  </code></pre>
  <p>It may not make sense but, I need to find a way to do that, I need that knowledge. I appreciate the answers about using a model, but I don't see a way to use a model without complicating what I think should be a simple task. Although not simple enough for me to figure out apparently. :)</p>
  <p>==========</p>
  <p>C#, VS 2019, a .NET framework console test app. I'm looking to do something simple but I can't find the right syntax.
  I have a json file with the following structure. I want to loop through each Employee below and get at its properties (name, gender, etc...):</p>
  <pre><code>{
    &quot;Company&quot;: {
      &quot;Employees&quot;: [
        {
          &quot;EmpName&quot;: &quot;John&quot;,
          &quot;EmpGender&quot;: &quot;Male&quot;,
          &quot;Age&quot;: &quot;25&quot;
        },
        {
          &quot;EmpName&quot;: &quot;Mary&quot;,
          &quot;EmpGender&quot;: &quot;Female&quot;
        },
        {
          &quot;EmpName&quot;: &quot;Bill&quot;,
          &quot;Age&quot;: &quot;30&quot;
        }
      ]
    }
  }
  </code></pre>
  <p>First question is which package will do the job? I've installed Microsoft.Extensions.Configuration.Json and System.Configuration.ConfigurationManager but am having difficulties getting the syntax correct. Are these the right packages to use? I decided to use those because I thought I could load the file via ConfigurationBuilder and that the GetSection and/or GetChildren methods would help me. I can load the file but I can't figure out how to use those methods to give me what I want.</p>
  <p>Second I don't want to build a model for this, I just want at the data. If I can get each employee into a dictionary, I can analyze that, and that would get me going. Thanks for any advice.</p>