-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

0

1 Answer 1

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);
        }
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.