title: Dynamic Property Name for JsonProperty in C#
body: <p>I am trying to create the JSON data using NewtonSoft in c#. I'm using following code-</p>
  
  <pre><code>[JsonProperty(PropertyName = "student")]
  public List&lt;Student&gt; obj{ get; set; }
  </code></pre>
  
  <p>which will create the list of JSON object for students. I wondered, is there any option to give the PropertyName dynamically, like here I'm using  <strong>PropertyName = "student"</strong>, I want take name dynamically.</p>
  
  <p>For Example I want following JSON Data-</p>
  
  <pre><code>{
  "id": "123",
   "st1": [
   {
    "Name": "chinna",
    },
   ],
   "st2": [
    {
    "Name": "krishan",
   },
   ]
   }
  </code></pre>
  
  <p>where st1 and st1 are PropertyName which I want to take dynamically.</p>