title: Retrieve Json value from laravel database
body: <p>I have table where has column (named <code>order_data</code>) which saves data as Json, now I want to retrieve data out of that column but all I get is column data itself as sample below</p>
  
  <pre><code>"{\"29\":{\"id\":29,\"name\":\"effewf\",\"price\":24524,\"quantity\":1,\"attributes\":[],\"conditions\":[]}}"
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/neLxf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/neLxf.png" alt="screenshot"></a></p>
  
  <p><strong>My question is:</strong></p>
  
  <blockquote>
    <p>How do I get my data such as <code>Product-&gt;title</code> out of that json column
    which is <code>effewf</code> in my sample code, or prices etc.</p>
  </blockquote>
  
  <p>here is my current function:</p>
  
  <pre><code>public function index()
      {
          $orders = Order::orderby('id', 'desc')-&gt;paginate(10);
          return view('admin.orders.index', compact('orders'));
      }
  </code></pre>
  
  <p>PS: I cleaned my function because all my ways I've tried didn't work so you have clean function to help me base on that.</p>
  
  <p>Here is what I tried:</p>
  
  <pre><code>orderss = Order::orderby('id', 'desc')-&gt;get(); 
  $orderss = json_decode($orderss-&gt;order_data);
  </code></pre>
  
  <p>And I got this error:</p>
  
  <blockquote>
    <p>Property [order_data] does not exist on this collection instance.</p>
  </blockquote>