I am creating a companies page in my application. The url is as follows: example.com/companies/google
I am getting the data from an API running localhost 4000 and, when it returns that data, it is returning this in the console.

While this is fine, it seems if I want to set my state to just the one object I would have to do something like this.setState = { company: res.data[0] }. To me it seems like there would be a better way to do this considering it will only ever return one object. Sidenote: I am just now entering in the Javascript/react world so excuse me if im missing the obvious here. Below is just the component mount function that returns the response data in the console.
Is there a better way to set the state of the company rather than setting it based on the first index in the array it returns?
componentWillMount() {
axios
.get(`http://localhost:4000/companies/${this.props.match.params.name}`)
.then(res => {
console.log(res.data);
});
}