Hey. I send the data to PHP using AJAX:
let data = { id: id, search_data: { props: proposals, airports: airports, airlines: airlines, gates: gates_info } }; $.ajax({ url: '/search/start.php', method: 'POST', data: { data: data }, dataType: 'json', }) Interestingly, I can access id via $_POST['data']['id'] , but when I try to parse the data from search_data with $_POST['data']['search_data'] I get an error:
Notice: Undefined index: search_data
dataType: 'json',......... yourdataNOT json - Alexey ShimanskydataTypeto the fact that PHP cannot parsedata?dataTypeis the format in which a response from the server is expected. - JamesJGoodwinprint_r( $_POST['data'] )result to the question? - Arnialпри чем тут json_decode зачем его здесь вызывать.- due to the structure he is trying to send apparently apparently - Alexei Shimansky