New Jersey is one of the best states to be a police officer even though public sentiment is still more negative than positive toward cops in the state, according to personal finance website WalletHub's analysis.

Jill Gonzalez said the report looked at 30 indicators of police friendliness, including  salaries and police department budgets.

New Jersey is the 9th best state to be a police officer, the report found.

Gonzalez said the state was second best in job hazards and protections. That's because New Jersey has a lot of policies in place that help protect the men and women in blue. Some of those policies include police body-worn cameras and required training in handling cases involving mental health, drug use and behavioral disorder issues.

There's also a requirement of de-escalation training, which teaches officers to diffuse what could be a dangerous situation. Gonzalez said because of that deaths of officers and suspects are low in New Jersey.

Gonzalez said when it comes to quality of life, particularly housing affordability, it's a problem when homes that cost a lot of money don't match up to the annual income for law enforcement officers. New Jersey ranked 36th in that category.

In the survey, New Jersey ranked 8th in law enforcement officers per capita, 8th in violent crime rate, 11th in state and local police protection expenses per capita and 17th in police deaths per 1000 officers.

New York is the best state to be a police officer followed by Maryland and California. The worst state to be a cop is Louisiana. Arkansas is second followed by Kentucky.

Also read:

::: Are NJ police salaries fair? Cops in high-crime areas get less

More from New Jersey 101.5: