add json_encode to array for log