I looked at similar questions, but none of them helped me. I am going to receive an object like the following:
[ { \"id\": 1, \"name\": \"Safa\",
I had the same error because I have mapped the HTTP response like this:
this.http.get(url).map(res => res.json);
Note how I accidentally called .json like a variable and not like a method.
Changing it to:
this.http.get(url).map(res => res.json());
did the trick.