export function getNodeChartFilteredData(ChartContent, value) {
let abs = "primary"
let url = `http://127.0.0.1:8000/api/v1/home/get_node_chart_data_people?abs=${abs}`;
fetch(url)
.then(res => res.json())
.then(res => {
return res
})
}
res = getNodeChartFilteredData()
console.log(res)
In ReactJS how can I get returned API result after complete in a different function?
My function is in utils so I want to call this function from different files.
I am always getting null data when I tried.