Datatable with static json data source
<p>I am trying to create a datatable with static data in json format without getting the json source data by hitting the server through ajax request.
Tried hard to find a way to do it, but no luck.Is it possible to do it with static json data variable as shown below,</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;jQuery DataTable&lt;/title&gt;
  &lt;link rel="stylesheet" href="jquery-ui.css"&gt;
  &lt;link rel="stylesheet" type="text/css" href="demo_table_jui.css" /&gt;
  &lt;link rel="stylesheet" type="text/css" href="jquery-ui-1.7.2.custom.css" /&gt;
  &lt;script src="jquery-1.10.2.js"&gt;&lt;/script&gt;
  &lt;script src="jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="complete.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="jquery.dataTables.min.js"&gt;&lt;/script&gt;


  &lt;script&gt;
  $(function() {
  var jsonData = [{"userID":"1","userName":"name1"},{"userID":"2","userName":"name2"},{"userID":"3","userName":"name3"}];
 $('#example').dataTable({
  data: jsonData,
      columns: [
          { data: 'userID' },
          { data: 'userName' }
      ]
 });

  });
  &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;table cellpadding="0" cellspacing="0" border="0" class="display" id="example" align="center"&gt;
 &lt;thead&gt;
  &lt;tr&gt;
   &lt;th&gt;UserID&lt;/th&gt;
   &lt;th&gt;userName&lt;/th&gt;
  &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;

 &lt;/tbody&gt;
&lt;/table&gt;

&lt;/body&gt;
&lt;/html&gt;</code></pre>
</div>
</div>
</p>

<p>Please give example ways of doing this. Thanks in advance.</p>