I need to convert this string
$json_string = [{"insert":"Test11"},{"insert":"","attributes":{"heading":3}}];
Into this json array
{
"ops":
[{"insert":"Test11"},{"insert":"","attributes":{"heading":3}}]
}
I converted the original string into array like this
$array = json_decode($json_string);
Now how to create a json object named "ops" that contains this array to be parsed using delta parser https://github.com/nadar/quill-delta-parser?
$json_obj = new array();$json_obj['ops'] = $array