Is there a way to remove the object from a JSON response and only keep the array of objects? I've tried using methods like Slice, Replace, and Filter but haven't been successful.
{"error":"no data"}[{"name":"Ali"},{"name":"Momin"}]
What I need is to have just the array of objects without the error message at the beginning:
[{"name":"Ali"},{"name":"Momin"}]
The data is stored in response.data
. How do I go about removing the error object from the beginning of the response?