title: how to access object in Codeigniter
body: <p>I have JSON formatted like this :</p>
  <pre><code> [{
      &quot;jenis_jurnal&quot;: &quot;pembayaran&quot;,
      &quot;no_perkiraan&quot;: &quot;2102-01-01&quot;,
      &quot;nama&quot;: &quot;Hutang Usaha&quot;,
      &quot;keterangan&quot;: &quot;PEMBAYARAN U\/ BIAYA NO: PP-2020-0104 TGL VOUCHER. 2021-01-01&quot;,
      &quot;potongan&quot;: &quot;250000&quot;,
      &quot;potongan_note&quot;: &quot;note potongan&quot;,
      &quot;coa_potongan&quot;: &quot;7104-01-01&quot;,
      &quot;coa_lain&quot;: &quot;5101-08-01&quot;,
      &quot;biaya_lain_note&quot;: &quot;ket biaya lain&quot;,
      &quot;debet&quot;: &quot;1650000&quot;,
      &quot;kredit&quot;: &quot;0&quot;,
      &quot;username&quot;: &quot;michaelb&quot;
  }]
  </code></pre>
  <p>and I return <code>jenis_jurnal</code>, like this:</p>
  <pre><code>$data-&gt;jenis_jurnal
  </code></pre>
  <p>but get an error:</p>
  <blockquote>
  <p>trying to get property of non object</p>
  </blockquote>
  <p>Where is my code wrong?</p>