0

i am getting a json object and a json array or objects in one response i want to remove the object and leave the json array how can i do that?

i tried Slice Replace and filter but no success

{"error":"no data"}[{"name":"Ali"},{"name":"Momin"}]

to

[{"name":"Ali"},{"name":"Momin"}]

i just want to remove the first part of the response. the data is stored in response.data variable how to remove this?
i want to remove the error object from the beginning of the response how can i do that?

saham nadeem
  • 101
  • 6

1 Answers1

0

it always does that automatically you jusr need to put the variable as array and it will push the data into it one by one

saham nadeem
  • 101
  • 6