My JSON data looks like this:
[{"title":"kunalsahu","start":"new Date($.now() + 158000000)","className":"bg-purple"}]
I would like the format to be like this:
[{title: 'kunalsahu',start: new Date($.now() + 158000000),className: 'bg-purple'}]
I don't know why you would want this as it's invalid JSON but try something like this:
$str = "[{"title":"kunalsahu","start":"new Date($.now() + 158000000)","className":"bg-purple"}]";
$str = preg_replace('/"([^"]+)"\s*:\s*/', '$1:', $str);
echo $str;