There is an ajax script that sends data to the server. This script returns two different strings, but in one variable:
.done(function(data){ console.log(data); }); How can I send one line with the data key, and the second with the response key, for example? I want to display one in the console as technical information, and use the second for my own purposes and not show it in the console.
For example:
<?php //какой-то код echo json_encode($somedata); // data //какой-то код var_dump($another_data); ?> I want to display this data with different keys and work with them differently.
UPD:
Added code:
echo json_encode(array( "technical_data" => $post_data, "user_data" => $response ), JSON_UNESCAPED_UNICODE);
console.logcall vp_arth does after all