I have 2 table, that is a question_table and answer_table the structure is like this :
And I have a JSON array that I got from question_table and answer_table using php
Can you try following code:
$sql = "select q.id, q.question, a.aswer from question_table q inner join answer_table a ON q.id = a.id_question”;
$resultPertanyaan = mysqli_query($con, $sql);
while($rowQuery= mysqli_fetch_array($resultPertanyaan)){
$array_result[]=
array('id'=>$rowQuery['id’],’question’=>$rowQuery['question'], 'answer' => $rowQuery['aswer']);
}