TypeError: response.map is not a function

ı am using ionic and angular full calendar . And ı want to make Http request but ı face this error.


import { map } from 'rxjs/operators';

    return this.http.get('http://localhost/api/lessons') .pipe(
      map(response => {
        return response.map((data) => {       **//ı have error about this line**
          return {...data,start: data.start_time};



    this.service.getEvents().subscribe(events => {
      this.events = events;



ı am facing error like TypeError: response.map is not a function . So please help me.

I don’t think you need that second map. The original map should break them into single entries, rather than an array.

but ı should making change name of object because angular full calendar doesnt accept start_time accept start and ı should transform my start_time to start. So what should ı do

if response.map is not a function, that means that the response isn’t an array. What type of object is response?

like this Response {_body: “[{“id”:2,“lesson_id”:5,“author”:30,“teacher_id”:30…”,“jurisdiction”:3,“delete”:0,“api_token”:null}}]", status: 200, ok: true, statusText: “OK”, headers: Headers, …}

Looks like the body your response is still stringified. You’ll have to parse it before you can use array functions on it.