I have this array:
$rows = array_map(function($item) {
return (object) ['c' => [
(object) ['v' => $item->job_type, 'f' => null],
(object) ['v' => intval($item->count), 'f' => null]
]];
}, array_values($data));
echo json_encode($data);
The output is like this:
{"1":{"job_id":"1","count":"8","job_type":"0"},"3":{"job_id":"3","count":"7","job_type":"1"}}
I want to change the value of job type from "0" to "job" and "1" to Internship.
How can i do that?