[Solved] Accessing python dictionary in javascript [duplicate]


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);
        }
    }
}

solved Accessing python dictionary in javascript [duplicate]