JSON_OBJECT
文字列としてPHPに返されます( prodigitalson
コメント)
すべてのデータを連想配列として使用する必要があります。
そのために、投稿した例では、json1
json_decode
を介して渡す必要があります 。
while ($row = mysqli_fetch_assoc($result)) {
$row['json1'] = json_decode( $row['json1'], true ); // <----
$resultArray[] = $row;
}
return $resultArray;
これで、目的の結果が得られるはずです:
echo json_encode($resultArray);