title: ASP.Net Core - Get All data of a post form
body: <p>I want to save all data of a form.</p>
  
  <p>My form has these elements-</p>
  
  <p><a href="https://i.stack.imgur.com/msoX1.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/msoX1.jpg" alt="enter image description here"></a></p>
  
  <p>( Using <a href="https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en" rel="noreferrer">Postman Plugin</a> )</p>
  
  <p>My controller is like this-</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;IActionResult&gt; Insert(IFormCollection data)
  {
      return Ok(data);
  }
  </code></pre>
  
  <p>So, I am getting something like this-</p>
  
  <pre><code>[
    {
      "key": "user_id",
      "value": [
        "'12'"
      ]
    },
    {
      "key": "title",
      "value": [
        "123"
      ]
    },
    {
      "key": "text[]",
      "value": [
        "werwer",
        "ghj"
      ]
    }
  ]
  </code></pre>
  
  <p>I want to get the value of <strong>texts</strong>.</p>
  
  <p>So, for this case-</p>
  
  <pre><code>"werwer",
  "ghj"
  </code></pre>
  
  <p>So, I have tried something like this-</p>
  
  <pre><code>foreach (string description in data["text"])
  {
      // description =&gt; empty
  }
  </code></pre>
  
  <p>and also tried this-</p>
  
  <pre><code>data.text
  </code></pre>
  
  <p>and also-</p>
  
  <pre><code>data-&gt;text
  </code></pre>
  
  <p>But nothing works for me.</p>
  
  <p>Can anyone please help?</p>
  
  <p>Thanks in advance for helping.</p>