## Response from Php File to Ajax is not getting sent

Question

I am trying to send some response from Php script to Ajax, but it is not getting sent.Below is my code.

For now I am sending dummy data which I will change later..

Php Script..

        $response = ['Successfull callback','ndnvnvnsobdboi','ijjijbujbhu']; echo json_encode($response);

die();


Ajax Script…

jQuery(document).ready(function($){$("#login_otp_btn").click(function(event){
val();
event.preventDefault();
jQuery.ajax({
url: wpac_ajax_url.ajax_url,
type:'POST',
data :{
dataType:'JSON',
login : $("#login_mobile").val(), success:function(response){ console.log("url wpac " + wpac_ajax_url.ajax_url); if(!response == ""){ response = JSON.parse( response ); console.log(response); }else{ console.log("Response is empty"); } }, });$("#login_otp_field").show();