-3

I am sending dictionary from python like this:

{'root':['value','path','type'],.......}

i am send it to javascript by ajax call request by serializing it,

How to access that dictionary in javascript.

thanks in Advance

Yaswanth
  • 89
  • 7

1 Answers1

1

Suppose you are making AJAX call in below way, you will get the response dict as resValue. use JSON.parse method on it

$.getJSON( "/url", {params }, function( data, status, xhr ) {
    $.each(data.response, function(resKey, resValue){
        if(resKey == "success"){
             var _result = JSON.parse(resValue);
        }
    }
}
mulla.azzi
  • 2,676
  • 4
  • 18
  • 25