<script type="text/javascript">
var pnr=863200;
$(document).ready(function() {
$(document).on('click','#search',function(){
$.ajax({
url: "http://127.0.0.1/pnrphp/pnr.php",
type: "POST",
data: 'pnrli='+pnr+'&action=pnrlist',
dataType:"JSON",
success: function(response) {
$.each(response,function(key,value){
} );
}
} );
} );
} );
</script>
How can i print the the below mainarray[1][0] to mainarray[1][12] in for each loop.
Object {maindata: Array[2], sum: Array[2], status: " CHART NOT PREPARED "}
maindata: Array[2]
0: Array[8]
1: Array[12]
0: "Passenger 1"
1: "W/L 25,RLGN "
2: "RAC 42"
3: "Passenger 2"
4: "W/L 26,RLGN "
5: "RAC 43"
6: "Passenger 3"
7: "W/L 27,RLGN "
8: "RAC 44"
9: "Passenger 4"
10: "W/L 28,RLGN "
11: "RAC 45"