Is this problem because of nested data?

Hello everyone,

I’m experimenting with Bubble to make some app’s with our API module. Its for our University of Applied Sciences and one of the API’s I’m working with is for the grades from one student. I read somewhere that Bubble cant deal with nested data. I have no experience with JSON, but the data below looks like nested data.

Below is the test environment data that I can pull.

{
“metadata”: {
“version”: “v1”,
“totalItems”: 77,
“totalPages”: 8,
“pageSize”: 10,
“hu_pageNumber”: 1
},
“data”: [
{
“hu_student”: “1656942”,
“hu_StudentDisplayName”: “René Mijnhu”,
“testResultId”: “2016|TCHT-AFOP8V-15|TOETS2”,
“courseId”: “2016|TCHT-AFOP8V-15”,
“hu_courseTitle”: “Final Assignment”,
“courseResult”: “https://huapim.azure-api.net/TEST/course/v1/courseresults/1656942/2016|TCHT-AFOP8V-15”,
“hu_collegeYear”: “2016”,
“hu_examinerDisplayName”: “name.surname@hu.nl”,
“description”: “ASS Afstudeeropdracht CT”,
“lastModified”: “2017-01-31T00:00:00Z”,
“testdate”: “2017-01-31T00:00:00Z”,
“grade”: “8”,
“comment”: “CURSUS_TOETS”,
“passed”: true,
“weight”: 100
},
{
“hu_student”: “1656942”,
“hu_StudentDisplayName”: “René Mijnhu”,
“testResultId”: “2016|TCHT-AFOP8V-15|TOETS1”,
“courseId”: “2016|TCHT-AFOP8V-15”,
“hu_courseTitle”: “Final Assignment”,
“courseResult”: “https://huapim.azure-api.net/TEST/course/v1/courseresults/1656942/2016|TCHT-AFOP8V-15”,
“hu_collegeYear”: “2016”,
“hu_examinerDisplayName”: “name.surname@hu.nl”,
“description”: “OPDR Plan van Aanpak AO”,
“lastModified”: “2016-10-03T00:00:00Z”,
“testdate”: “2016-10-03T00:00:00Z”,
“grade”: “VD”,
“comment”: “CURSUS_TOETS”,
“passed”: true,
“weight”: 0
},
{
“hu_student”: “1656942”,
“hu_StudentDisplayName”: “René Mijnhu”,
“testResultId”: “2015|TCHT-TRVE6V-14|TOETS1”,
“courseId”: “2015|TCHT-TRVE6V-14”,
“hu_courseTitle”: “Transport Phenomena”,
“courseResult”: “https://huapim.azure-api.net/TEST/course/v1/courseresults/1656942/2015|TCHT-TRVE6V-14”,
“hu_collegeYear”: “2015”,
“hu_examinerDisplayName”: “name.surname@hu.nl”,
“description”: “CTP continue toetsing praktijk”,
“lastModified”: “2016-06-23T00:00:00Z”,
“testdate”: “2016-06-23T00:00:00Z”,
“grade”: “7,3”,
“comment”: “CURSUS_TOETS”,
“passed”: true,
“weight”: 35
},
{
“hu_student”: “1656942”,
“hu_StudentDisplayName”: “René Mijnhu”,
“testResultId”: “2015|TCHT-REAT6V-14|TOETS1”,
“courseId”: “2015|TCHT-REAT6V-14”,
“hu_courseTitle”: “Reactor Technology”,
“courseResult”: “https://huapim.azure-api.net/TEST/course/v1/courseresults/1656942/2015|TCHT-REAT6V-14”,
“hu_collegeYear”: “2015”,
“hu_examinerDisplayName”: “name.surname@hu.nl”,
“description”: “CTP continue toetsing praktijk”,
“lastModified”: “2016-06-21T00:00:00Z”,
“testdate”: “2016-06-21T00:00:00Z”,
“grade”: “7,3”,
“comment”: “CURSUS_TOETS”,
“passed”: true,
“weight”: 35
}
]
}

When I put that in a new thing inside Bubble, I dont get every entry in a new row, but all the grades are being dumped in one cell. This way I dont know how to pull out seperate data. I know some PHP,MSQL. I thought I needed to get every entry on a new row in the database.

Heres an Image with the data in the database.
http://imgur.com/a/dOTdg

Can anyone help me? I’ve been puzzling with this issue for a few days and cant wrap my head around it. Is the way the data is being dumped, the way it should be dumped with JSON? How can I show a list of grades to the user in the app when everything is being dumped?

Cheers,
Jan

Is that actual personal information from HU? Maybe better to blur that out?

1 Like

Thanks! Turns out one of the names where not fake ones. Editted the personal information out of the example.

No problem, better safe than sorry :smiley:
Not an answer to your question though…

The nested data issue related to Webhooks… it’s been fixed as of last week, please see here:

1 Like

The nested structure is object / list / objects. If you are using the API Connector, the list should be handled okay, you can see this by setting it to a repeating group.

This is the issue, you are putting list data into a single ‘thing’ i.e. a single row. Can you share how you are doing this step? Is it in an API workflow, or a normal workflow?

The easiest way to write multiple things/rows from a list is using ‘Schedule API workflow on a list’, but there are other ways that may be suitable, depending on where you are doing it and how large a list.

Good luck!

Great thanks for helping me! At least thats not the problem :slight_smile:

Awesome, thats an insight I can use :slight_smile:

I’m following the etsy tutorial (https://vimeo.com/162729137) seen from 4:01 is the workflow they make. I copied that as my test project seemed to do the same. The difference, I realise now, is that the Etsy tutorial works with selecting one specific item number and fetching that from Etsy.

Instead of fetching everything and working with that!