title: Datatables: dropdown in a cell
body: <p>i'm trying to generate a table with Datatables.</p>
  
  <p>I receive a json from my controller, here a sample:</p>
  
  <p><a href="https://i.stack.imgur.com/POM5x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/POM5x.png" alt="enter image description here"></a></p>
  
  <p>this json can change (number of columns, name of the columns) and I can build my table with the good number of column and the good name.</p>
  
  <p>My question is: </p>
  
  <p>How can i do to have a dropdown when the "liste" have an array and a simple input when it's null?</p>
  
  <p>Is it even possible?</p>
  
  <p>EDIT :
  I forget to explain something. The Json that I receive is a json to build the table not to fill it. So is it possible to do a columnsDef before the datas are in the cell.</p>
  
  <p>EDIT n°2:
  I used the solution that I accepted, but the problem was with my json. I tried to send a json to build and a json to fill the table. So I change my json and I send the list of options in the json to fill the table. </p>
  
  <p>Hope it will help other people.</p>
  
  <p>Thanks</p>