I have a nested JSON output that I receive from one of the API calls and I want to use the data to fill up my Bubble Data. The JSON file has a nested structure and I am using a Backend workflow to create entries in the Data. Due to the nested structure of the JSON, I am not able to create a mapping or relationship between the child data point and the parent data point. Here is an example of the JSON: [ { "review_text": "The view is really quite nice. Had trouble parking due to lack of parking space", "results": [ { "aspect": "view", "segment": "view is really quite nice", "sentiment": "positive" }, { "aspect": "parking", "segment": "Had trouble parking due to lack of parking space", "sentiment": "negative" } ] }]
I have 4 different Data tables, one for each field: âreview_textâ, âsegmentâ, âaspectâ and âsentimentâ. I somehow need to map âsegmentâ, âaspectâ and âsentimentâ back to their parent which is âreview_textâ. I created a backend workflow that creates a new parent field (review_text) first and then within that backend workflow, I call a new backend workflow that iterates through the âresultsâ field and creates and maps the child fields âsegmentâ, âaspectâ and âsentimentâ. The issue is that I cannot pass the âresultsâ field from the json as a value because it doesnât match the data types from the dropdown. I also tried sending the âsegmentsâ, âaspectsâ, âsentimentâ fields as a list of text, but Bubble doesnât seem to treat those as a lists and treats is as text instead.
I wonder if there is a better way to solve this problem. Have any of you guys faced a similar problem or know how o solve this?