title: DB::table Select() returns Array as String Laravel
body: <p>I want to get users list as per distance and in user DB I stored user images in json format. When I use <code>DB::table</code> it return as string not as array.</p>
  <p>Please Help me.</p>
  <p>My Controller:</p>
  <pre><code>$doc = DB::table( 'users' )
              -&gt;select(
                  'id',
                  'name',
                  'image',
                  'latitude',
                  'longitude' )
              -&gt;selectRaw( &quot;{$getDistance} AS distance&quot; )
              -&gt;orderBy( 'distance' )
              -&gt;get();
  </code></pre>
  <p>CURRENT JSON RESPONSE:</p>
  <pre><code>{
  &quot;name&quot;: &quot;User One&quot;,
  &quot;image&quot;: &quot;[\&quot;f0f159c7238b8c9a1a3e5c9bd48de2a5cJ8Y4ssqzcuoWJAS1614581337EC2fGzmRCjf9wphI.webp\&quot;, 
           \&quot;f0f159c7238b8c9a1a3e5c9bd48de2a5tvof9EarZgvupGpa1614581337zvPSnQchCjSL9lZS.webp\&quot;]&quot;,
  }
  </code></pre>
  <p>What I WANT TO GET:</p>
  <pre><code>{
  &quot;name&quot;: &quot;User One&quot;,
  &quot;image&quot;: [&quot;f0f159c7238b8c9a1a3e5c9bd48de2a5cJ8Y4ssqzcuoWJAS1614581337EC2fGzmRCjf9wphI.webp&quot;, 
           &quot;f0f159c7238b8c9a1a3e5c9bd48de2a5tvof9EarZgvupGpa1614581337zvPSnQchCjSL9lZS.webp&quot;],
  }
  </code></pre>