json.total_count @issues.total_count 
json.issues @issues.each do |issue| 
  if params[:only_name].present? 
    json.(issue, :id, :subject, :project_issues_index)
  else 
    json.partial! "api/v1/issues/simple_detail", locals: {issue: issue}
  end
end