Object.status: -1, Relative path is empty for GET Record


I am not getting a GET record response in ag GET collection works well, however for GET record i am getting data in developers tools:

Can you guys please help.

Check your api response. It sends you a list of objects even for the Get record. For the get record to work correctly it should only return an object.

I am not sure how is the api configured. Maybe the issue is that you request the “products?”" Which most probably sends a list of objects even if it is only one object. [{}] is a list of objects. While {} is a single object. You can see it in the dev tools as well…

Let me give it a try


Thanks a ton for [{}] and {} this gives me the other idea for implementing the logic.

I have another question, for the GET collection or any object how to iterate over the elements, like the below:

“id” : 1,
“name” : “jhon”
“id” : 2,
“name” : “Doe”
“id” : 3,
“name” : “Frank”

When I get the data record, I only get the [0] position, I tried with SELECT and MAP but with no luck.

Can you please help me ]?