# A way to parse this rather strange api

**URL:** <https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302>\
**Category:** Questions about Thunkable X\
**Tags:** json\
**Created:** [January 7, 2021, 2:06am UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302 "2021-01-07T02:06:26Z")\
**Posts on this page:** 11\
**Page:** 2

<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:** [January 7, 2021, 7:48pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/22 "2021-01-07T19:48:07Z")

</div>

So… yes to the structure. That’s exactly right. But JSON is not necessary with Firebase (it _can_ be used).

You simply use the “Set Cloud variable ‘name’ block” and enter the path to the value as the name of the variable. I can provide a screenshot of blocks later if it’s helpful but you might do something like group name/Variable to get the value in 1. A. above. If you had unique names (which you’ll want to use), you might have this:

1. Mazda  
A. Miata: 14

Maybe the 14 represents the number of Miatas that have been retrieved from the JSON response. Not a great example, I know, but bear with me.

Your Cloud variable would be named [bucket name]/Mazda/Miata. There’s no need for the realtime DB blocks. You just use variable blocks and that’s it.

---

<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:** [January 7, 2021, 7:50pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/23 "2021-01-07T19:50:20Z")

</div>

A few topics related to this:

> [@Cant get data from Cloud child](http://community.thunkable.com/t/cant-get-data-from-cloud-child/1042322/4):
>
> You could do something like this EXCEPT… Thunkable expected firebase lists to start with a 0 index. It looks like your lists start with 1. If the list index does not start with zero, Thunkable will crash. This is a REALLY crummy thing about Thunkable lists. Thunkable decided to use lists starting with 1. BUT thunkable is a graphic wrapper around Javascript, for which lists start with 0. So when comparing Firebase lists (zero based) with Thunkable Lists (base 1) you need to adjust. I…

> [@\[Solved\] Working with cloud lists](http://community.thunkable.com/t/solved-working-with-cloud-lists/1040317):
>
> I’m wondering if anyone can answer my question related to using lists with the cloud variables. I have begun saving objects to lists firebase instead of airtable. it works quite nice. i am running into issues when i delete nodes from that list. this breaks ‘list actions’ in brief. I had tried to delete node 0 from the data ‘bucket’ above and it broke the following code. using debugging i could identify that the ‘break’ occurred on the very first check …

> [@JSON Bound Data List Viewer - No More Cloning!](http://community.thunkable.com/t/json-bound-data-list-viewer-no-more-cloning/1041807):
>
> If you have been thunking for a while, you may have learned a few things: Data List Viewers and Data Grid Viewers are easy to design and execute quickly on devices Data List Viewer and Data Grid Viewer components cannot be bound to JSON All sorts of Web APIs and Firebase RealtimeDB (aka cloud variables) use JSON Airtable and Google Sheet data sources are generally slower and less reliable than Firebase/Cloud Variables Creating or cloning components for JSON lists are progressively slower and a…

---

<div class="post-metadata">

**Author:** ![bluerfox15uht9](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bluerfox15uht9](https://community.thunkable.com/u/bluerfox15uht9)\
**Post date:** [January 7, 2021, 8:10pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/24 "2021-01-07T20:10:55Z")

</div>

basically, I’m making an app for people who come to my auto garage.

the user data on fire base would be:  
username  
password  
uuid  
vin# (so we can order the proper parts using the vin, which removes a-lot of headache)  
a log of the stuff that we’ve done to the car (were currently using google sheets, but i _HATE_ it)

now I’m just trying to figure out how exactly i can discern between people logging in, so when people input THEIR vin, it doesn’t change the same single cloud-variable on the database

i remember there being an option in firebase to “collect user data” but i never figured it out all the way. which is what I’m currently digging around attempting to find again, lol

---

<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:** [January 7, 2021, 8:14pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/25 "2021-01-07T20:14:55Z")

</div>

I’m right now working on a photo journal app where users can sign up, sign in, and then store and retrieve photos with timestamps and captions that they’ve generated. So I’m no expert yet but I do have it working. And there are many topics on this in the forums. I’ve been Googling _firebase sign in thunkable_ to find info.

---

<div class="post-metadata">

**Author:** ![bluerfox15uht9](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bluerfox15uht9](https://community.thunkable.com/u/bluerfox15uht9)\
**Post date:** [January 7, 2021, 8:48pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/26 "2021-01-07T20:48:45Z")

</div>

what I’m thinking is either using the database like so:

1. user A  
a) info a  
b) info c  
c) info c
2. user B  
a) info a  
b) info c  
c) info c
3. user C  
a) info a  
b) info c  
c) info c

but i have no idea how i could set that up to be automated…

---

<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:** [January 7, 2021, 8:53pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/27 "2021-01-07T20:53:56Z")

</div>

Check out the first of the three links I posted above. It has a similar structure and might give you an idea how to get started.

---

<div class="post-metadata">

**Author:** ![bluerfox15uht9](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bluerfox15uht9](https://community.thunkable.com/u/bluerfox15uht9)\
**Post date:** [January 7, 2021, 10:03pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/28 "2021-01-07T22:03:49Z")

</div>

thanks, man, i actually just got dun making a login screen that calculates if the vin is valid, took me a whole day to get the calculation, lol

i have the thunkable parts all well and good,

 ![my crazy sign on screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b07c3f3747d5d14cdbe9f962467d58b5e8f0bbbb.png)

---

<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:** [January 8, 2021, 8:12am UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/29 "2021-01-08T08:12:48Z")

</div>

That looks insane. Does the API return an error if the VIN is invalid? That would certainly simplify things.

---

<div class="post-metadata">

**Author:** ![bluerfox15uht9](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bluerfox15uht9](https://community.thunkable.com/u/bluerfox15uht9)\
**Post date:** [January 8, 2021, 1:12pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/30 "2021-01-08T13:12:00Z")

</div>

I’d does, but I had built that out before I got this api working… And it’s simpler to just leave it…

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [January 10, 2021, 9:20am UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/31 "2021-01-10T09:20:07Z")

</div>

i wonder if you will find this VIN check digit calculator useful. Apparently, the 9th digit of the VIN is the check digit and it is based on the values of all the other characters in the VIN . see below:

> **[Vehicle Identification Numbers (VIN codes)/Check digit - Wikibooks, open...](https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Check_digit)**

i’ve coded the algorithm in thunkable and this app below (using new drag and drop interface) shows how it is used: you supply a VIN and it will return the VIN with the correct check digit in the 9th position.

> **[Thunkable](https://x.thunkable.com/copy/acf1b417c7c0fea7e15a4bfad0bff1a3)**

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:31pm UTC](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302/32 "2024-11-08T13:31:01Z")

</div>



[Previous page](https://community.thunkable.com/t/a-way-to-parse-this-rather-strange-api/1042302.md?page=1)
