title: react material ui populate table from API response
body: <p>Material ui table accept data in this format.</p>
  
  <pre><code> rows: [
        createData(1, "dashboard", "details"),
        createData(2, "product", "product details"),
      ].sort((a, b) =&gt; (a.id &lt; b.id ? -1 : 1))
  </code></pre>
  
  <p>And the response from API that I store in state is like</p>
  
  <pre><code>rows: Array(2)
   0: {id: 1, category_name: "dashboard", category_details: "details"}
   1: {id: 2, category_name: "product", category_details: "product details"}
   length: 2
  __proto__: Array(0)
  </code></pre>
  
  <p>So how to assign the response from json array to material ui table in react?</p>