- json_decode: documentation ( source)
- array_merge: documentation ( source)
- json_encode: documentation ( source)
<?php
$a = '[{"COLUMN_NAME":"ORDER_NO","COLUMN_TITLE":"Order Number"},{"COLUMN_NAME":"CUSTOMER_NO","COLUMN_TITLE":"Customer Number"}]';
$b = '[{"COLUMN_NAME":"ORDER_NO","DEFAULT_VALUE":"1521"},{"COLUMN_NAME":"CUSTOMER_NO","DEFAULT_VALUEE":"C1435"}]';
$r = [];
foreach(json_decode($a, true) as $key => $arra){
$r[$key] = array_merge(json_decode($b, true)[$key],$arra);
}
echo json_encode($r);