when I am printing console.log(response.data) in console below output is coming.
I created one hook const [result,setResult] = useState([]);
and then output of API I set as
setResult(response.data);
when I am writing below code it is just printing " Data is". it is not printing output of result
<h1>
Data is
{
result.map((res:any)=>{
{res.id};
})
}
</h1>
what mistake I am doing?

return res.id. Try something like thisresult.map((res) => res.id)considering the fact you only want id of each element