Nearly two-thirds of voters in Tuesday's midterm elections said the U.S. economy was in "excellent" or "good" shape, according to the Fox News Voter Analysis.

The survey showed 65 percent of voters had a positive view of the economy, compared to 34 percent with a negative view. Despite that, about 6 in 10 voters said the country is heading in the wrong direction, while around 4 in 10 said it's on the right track.

Voters were more sharply divided on President Trump's long-promised plan to build a wall along the U.S.-Mexico border, with 46 percent in favor of the proposal and 53 percent opposing it. About 6 in 10 voters said it should be the responsibility of the federal government to make sure that all Americans have health care coverage.

Those who went to the polls on Election Day were nearly evenly split about the fate of ObamaCare, with 51 percent wanting to repeal all or parts of the Affordable Care Act and 48 percent wanting to either keep the law as it is or expand it. A narrow plurality (27 percent) of voters saw health care as the most important issue facing the country in these midterms, followed by immigration (23 percent). Smaller shares considered the economy (19 percent), gun policy (8 percent) and the environment (7 percent) to be the top issue.

Those who voted for a Democratic House candidate were more likely to say health care was their top issue, while those who voted for a Republican were more likely to name immigration.

Despite division on many issues, a whopping 81 percent of national voters said they didn't trust the federal government. Just 19 percent said they did.

The analysis, conducted in partnership with the Associated Press, is based on surveys conducted in all 50 states by NORC at the University of Chicago, as well as actual voting results by county, as collected by the AP. The survey of 113,677 voters and 21,599 nonvoters was conducted Oct. 29 to Nov. 6, concluding as polls close on Election Day.

Fox News' Dana Blanton and Shannon Bream and The Associated Press contributed to this report.