Как я могу отправить 2 разных PHP-массива в JavaScript?

Как я могу отправить 2 массива на JavaScript и использовать их в другой части файла JavaScript? (извините, что я новичок и борюсь весь вечер с этим вопросом)

У меня есть php-файл с 2 массивами. В JavaScript у меня есть запрос ajax для получения массивов. Но я могу вернуть только один. И я не могу сохранить вывод, поэтому я могу for each них позже.

 //Get arrays $.ajax( { type: 'get', url: '../classes/bestanden_overzicht_client.php', data: "id="+id, success:function(data)//we got the response of ajax :) { <-- how can i target the 2 arrays and send them to function below --> }, error:function(data) { //no respons show error. alert ("error!"); alert(JSON.stringify(data)) //we give an alert of the error when there is no respons from ajax ;} }); ("#images").fileinput({ uploadAsync: false, overwriteInitial: false, initialPreview: [ <-- want here the output of the array1 ], intialConfig [ <-- Want here the output of array2 ] <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <?php $array1 = array(); $array2 = array(); $array1[0] = "numbers"; $array1[1] = "letters"; $array2[0] = "forname"; $array2[0] = "surname"; echo json_encode($array1); echo json_encode($array2); ?>