title: Get Key Names from Raw JSON POST Request in C#
body: <p>I'm trying to read values of a raw JSON POST request, and convert only the passed in field (key) names to an object.</p>
  
  <p>If I post a JSON string such as:</p>
  
  <pre><code>{ 
       "FirstName": "Test",
       "LastName": "User",
       "MiddleInitials": null
  }
  </code></pre>
  
  <p>And then I convert the JSON string to an object, after reading the input stream from the request body:</p>
  
  <pre><code>// Read the InputStream
  StreamReader reader = new StreamReader(Request.Body);
  reader.BaseStream.Position = 0;
  string jsonText = reader.ReadToEnd();
  
  // Deserialize to object and read property names
  object jsonObject = JsonConvert.DeserializeObject(jsonText);
  </code></pre>
  
  <p>Then when I inspect the object, I see the following:
  <a href="https://i.stack.imgur.com/6kn7W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6kn7W.png" alt="enter image description here"></a>
  How do I just get the key values (FirstName, LastName, MiddleInitials)?</p>