# \[Solved\] Backendless Web API response object issue

**URL:** <https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056>\
**Category:** Web API's\
**Tags:** help\
**Created:** [February 22, 2024, 5:02am UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056 "2024-02-22T05:02:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![godtap](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/godtap/32/181507_2.png) [@godtap](https://community.thunkable.com/u/godtap)\
**Post date:** [February 22, 2024, 5:02am UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056/1 "2024-02-22T05:02:45Z")

</div>

Dear team, I’m having a hard time getting values from a response object provided by Web API from Backendless. It’s strange. I wonder what I might be doing wrong here:

First let me show you what I get when I put the whole response into a label:

`{"lastLogin":1708577375153,"slices":90,"userStatus":"ENABLED","saved":null,"ownerId":"01AA8D65-ED84-76E9-FF2A-DADCE0CA9300","points":896,"shares":5,"pushId":null,"skips":null,"hearers":0,"seshes":3,"___class":"Users","theme":null,"blUserLocale":"en","speeds":4,"objectId":"01AA8D65-ED84-76E9-FF2A-DADCE0CA9300","email":"alice@yourmail.com","events":["Testing123", "TestingABC", "TestingXYZ"],"latest":null,"created":1707625253090,"accountType":"BACKENDLESS","streak":0,"socialAccount":"BACKENDLESS","oAuthIdentities":null,"friends":null,"special":100,"smthng":null,"name":null,"spoken":100,"location":null,"user-token":"CC7A0616-CE58-41D2-9701-1B2A1A868DBD","updated":1708569264064,"mark":"01AA8D65"}`

These are the blocks that got the above response:

 ![Screenshot 2024-02-21 214316](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/0/80129e3221acb7c6e4e750db3ab41c908d15b99a.png)

I get a “null” when I try it 2 different ways below:

 ![Screenshot 2024-02-21 215259](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cb069dccf1579b50018478fb9b11fce8e2c6f02b.png)  
 ![Screenshot 2024-02-21 214155](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/3/73af05f243b945e7880eaf63f6e411cf4ddf1b49.png)

Even with the Get block for the SaveObjectAPI, I get a null:

 ![Screenshot 2024-02-21 220042](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/c/5c08edd2c571a5c1a516513d8ced097d95a18ead.jpeg)

I’m getting these same results on both web app and ios Live Testing. Thanks for any help.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 22, 2024, 5:38am UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056/2 "2024-02-22T05:38:59Z")

</div>

You’re not parsing the JSON correctly. The “message”, “userID” and “userId” properties do not exist in the JSON response you’re getting back from the API server.

If it’s helpful, you can review my API tutorial at [API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575).

Here are some steps to try:

1. Whenever you get a property of an object, you need to make sure it’s actually an object you’re attaching. The green `response` block for an API returns JSON or an error. It does not return an object. So you’ll need to include the `get object from JSON` block. You did that in some cases but not in every case.

2. Format your JSON on the forums by using the \</\> button in the toolbar. This fixes smart quotes. I went ahead and did that for you in your post.

3. Copy the full JSON response text and paste it into [Best JSON Viewer and JSON Beautifier Online](https://codebeautify.org/jsonviewer). That will create a “tree” view of your data which is much easier to understand and which allows you to click on a property name (such as “slices” in this screenshot) and view the path to that property at the top:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/27ecf47d036d16cbfad03ab971896ffd24a98730.png)

1. Decide which properties you need and determine their paths using step #2 above. For each path, use a `get property of object` block. The name of the property should be the path to the property name on [Best JSON Viewer and JSON Beautifier Online](https://codebeautify.org/jsonviewer). For example, to get the _slices_ value, you would get the property named “slices”. To get the first item of the _events_ property array/list, you would get the property named “events[1]”.

2. Test and post screenshots if it’s still not working.

---

<div class="post-metadata">

**Author:** ![godtap](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/godtap/32/181507_2.png) [@godtap](https://community.thunkable.com/u/godtap)\
**Post date:** [February 22, 2024, 6:05am UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056/3 "2024-02-22T06:05:53Z")

</div>

> [@godtap](#):
>
> {“[lastLogin":1708577375153,“slices”:90,“userStatus”:“ENABLED”,“saved”:null,“ownerId”:“01AA8D65-ED84-76E9-FF2A-DADCE0CA9300”,“points”:896,“shares”:5,“pushId”:null,“skips”:null,“hearers”:0,“seshes”:3,“\_\_\_class”:“Users”,“theme”:null,“blUserLocale”:“en”,“speeds”:4,“objectId”:“01AA8D65-ED84-76E9-FF2A-DADCE0CA9300”,“email”:"alice@yourmail.com](mailto:lastLogin%22:1708577375153,%22slices%22:90,%22userStatus%22:%22ENABLED%22,%22saved%22:null,%22ownerId%22:%2201AA8D65-ED84-76E9-FF2A-DADCE0CA9300%22,%22points%22:896,%22shares%22:5,%22pushId%22:null,%22skips%22:null,%22hearers%22:0,%22seshes%22:3,%22___class%22:%22Users%22,%22theme%22:null,%22blUserLocale%22:%22en%22,%22speeds%22:4,%22objectId%22:%2201AA8D65-ED84-76E9-FF2A-DADCE0CA9300%22,%22email%22:%22alice@yourmail.com)”,“events”:[“Testing123”, “TestingABC”, “TestingXYZ”],“latest”:null,“created”:1707625253090,“accountType”:“BACKENDLESS”,“streak”:0,“socialAccount”:“BACKENDLESS”,“oAuthIdentities”:null,“friends”:null,“special”:100,“smthng”:null,“name”:null,“spoken”:100,“location”:null,“user-token”:“CC7A0616-CE58-41D2-9701-1B2A1A868DBD”,“updated”:1708569264064,“mark”:“01AA8D65”}

Thank you for coming to my rescue! I’m sorry about the confusion. I sorta gave you a bad example there with the userId property as I had tried many of the other properties using the Get Block which is the one that’s really been giving problems. I confused myself there as well by trying to test the userId property which I assumed would be there too. Thanks for helping me to confirm that the response object from the Login API works well. What a relief! Please help me to figure out the Get block though. I get null for everything I’ve tried with it so far.

This is what I get when I put the whole JSON response into the label:

```auto
[{"lastLogin":1708581309000,"slices":90,"userStatus":"ENABLED","saved":null,"ownerId":"01AA8D65-ED84-76E9-FF2A-DADCE0CA9300","points":896,"shares":5,"pushId":null,"skips":null,"hearers":0,"seshes":3,"___class":"Users","theme":null,"blUserLocale":"en","speeds":4,"objectId":"01AA8D65-ED84-76E9-FF2A-DADCE0CA9300","email":"alice@yourmail.com","events":["Testing123", "TestingABC", "TestingXYZ"],"latest":null,"created":1707625253090,"accountType":"BACKENDLESS","streak":0,"socialAccount":"BACKENDLESS","oAuthIdentities":null,"friends":null,"special":100,"smthng":null,"name":null,"spoken":100,"location":null,"updated":1708580921464,"mark":"01AA8D65"}]

```

Here are the blocks I used:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/8/787ffa215d73b2dac083bfd74b583dfaf9e229f6.png)

I tried using the tool that you provided. Here’s an example where I try to get the email property:

 ![Screenshot 2024-02-22 010424](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9de579eaf14fa67db29687e5a9eea5a5dfd89655.jpeg)

I went through your JSON tutorial before, I think it’s the Array part that is tricky here. (Also, the response only has a message property if there is an error.)

---

<div class="post-metadata">

**Author:** ![godtap](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/godtap/32/181507_2.png) [@godtap](https://community.thunkable.com/u/godtap)\
**Post date:** [February 22, 2024, 6:18am UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056/4 "2024-02-22T06:18:21Z")

</div>

I just figured it out! Thank you! All I needed was a helping hand. Thanks again man!

 ![Screenshot 2024-02-22 011640](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e0bf575329a7abb5e850a0e92b76495e99dbf0a6.png)

That clears it all up! Peace be with you! God bless! (Please let me know if there is a better way to do this?)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 22, 2024, 7:59am UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056/5 "2024-02-22T07:59:59Z")

</div>

You’re welcome! Glad it’s working now.

What you have is good. I prefer to use “[1].mark” for the property name but that doesn’t mean it’s “the right way” to do it. It’s just another way.

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [February 22, 2024, 2:18pm UTC](https://community.thunkable.com/t/solved-backendless-web-api-response-object-issue/2849056/6 "2024-02-22T14:18:30Z")

</div>


