Property data doesnt exist on type response

i have this error when fetching json data from server,how can i fix it

Property ‘data’ does not exist on type ‘Response’.

.map((response: Response) => response).subscribe(data => {
this.posts =;

Blind guess: the data node returned by ur Server is called ‘Data’ not ‘data’.
It’s case sensitive

Please provide more of your Code and you server’s response

Use the Angular HttpClient with your response type as the generic.