Assign json respone to variable & access out side ajax function

Assign json respone to variable & access out side ajax function

$.ajax({    
  type: "POST", 
  async: false,
  dataType: "json",
  url: "get_data.php",
  success: function(data){      
  charts = data;
       }   
        });
//ajax fucntion end;



in above code i assign  json response to variable
i am getting  {"two":[[20,22,30,40],[2,20,24,34]]} as json response.
but i assigned this response to charts variable.

but how to access that variable  in out side ajax fucntion

alert(charts.two[0]);
it is giving error