title: Send a dictionary where values are in a list back to an ajax request and try to parse it there
body: <p>I am trying to send a dictionary like this (values in a list):</p>
  <pre><code>datax = { &quot;name&quot;: [&quot;bhanu&quot;, &quot;sivanagulu&quot;,&quot;daniel&quot;],
               &quot;department&quot;: [&quot;HR&quot;, &quot;IT&quot;, &quot;FI&quot;]}
  </code></pre>
  <p>back to an ajax request. I use two methods, it is sent, but can't unpack the content. Here are the two methods and what it looks:</p>
  <ol>
  <li><code>return HttpResponse(simplejson.dumps(datax))</code></li>
  </ol>
  <p>This is what gets sent:</p>
  <pre><code>0   Object { name: […], department: […] }
  name    [ &quot;bhanu&quot;, &quot;sivanagulu&quot;, &quot;daniel&quot; ]
  department  [ &quot;HR&quot;, &quot;IT&quot;, &quot;FI&quot; ]
  </code></pre>
  <p>If I try this:</p>
  <pre><code>json_dict = json.dumps(datax)  
  return JsonResponse(json_dict,safe=False)
  </code></pre>
  <p>I get this:</p>
  <pre><code>[{\&quot;name\&quot;: [\&quot;bhanu\&quot;, \&quot;sivanagulu\&quot;, \&quot;daniel\&quot;], \&quot;department\&quot;: [\&quot;HR\&quot;, \&quot;IT\&quot;, \&quot;FI\&quot;]}]&quot;
  </code></pre>
  <p>in both cases, when at the client I try to parse the content,</p>
  <pre><code>obj = JSON.parse( data);
  </code></pre>
  <p>I get this when I try to tabulate:</p>
  <pre><code>name    [object Object] [object Object]     [object Object]
  </code></pre>
  <p><a href="https://i.stack.imgur.com/SxzVM.png" rel="nofollow noreferrer">this firefox console what gets sent but not parsed</a></p>