I am currently experiencing a problem with my axios request.
Here is an example of the result of my query:
{
"results": [
{
"first_result": "123",
"second_result(abc)": "456"
}
]
}
As you can see, the second line contains parentheses. How can I get this data (here "456"), with my useState?
axios
.get(API)
.then((response) => response.data)
.then((data) => {
setObject(data.results[0].second_result(abc)))
})
Thank you very much and have an nice day ! =)