title: How to decode a json.stringify array in php without using explode function?
body: <p>I have a form with a <code>table</code>,<code>input[type=text]</code>and a <code>button[type=submit]</code>. If I click the submit button, it will assign the value of input field with the data from the table. I made the data from the table into a json form.  And I assign it like this in js:</p>
  
  <pre><code>document.getElementById("inputField").value =JSON.stringify(tb);
  </code></pre>
  
  <p>I want the value of the <code>inputField</code> to be in json form again inside the controller so that I can easily distribute the value. What I have in the controller is this:</p>
  
  <pre><code>$string =$this-&gt;input-&gt;post('inputField');
  </code></pre>
  
  <p>I entered the following values in my table</p>
  
  <p><img src="https://i.stack.imgur.com/yAoxp.png" alt="enter image description here"></p>
  
  <p>It gives me this output when I echo it:
  <img src="https://i.stack.imgur.com/xClqA.png" alt="enter image description here">
  But when I do <code>echo json_decode($this-&gt;input-&gt;post('inputField'));</code>, it gave $this error: <strong>Array to string conversion</strong>.
  How to solve this?</p>
  
  <p>EDIT:
  When I do <code>print_r(json_decode($this-&gt;input-&gt;post('inputField')));</code>, it gave me this result: </p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( [firstname] =&gt; Angelina [middlename] =&gt; Jolie [lastname] =&gt; Voight ) [1] =&gt; stdClass Object ( [firstname] =&gt; William [middlename] =&gt; Bradley [lastname] =&gt; Pitt ) )
  </code></pre>