Json to Bubble Plugin Help

Hey

I purchased your plugin will the plugin help me get this json into data base. Its basically a restaurant menu with categories and menu items. Example

thank you { “merchantid”: “1760706889197x714907637232557800”, “items”: [ { “category”: “Minestre”, “name”: “Suppe1”, “description”: “Tomatencremesuppe mit Basilikumpesto und Sahnehäubchen”, “price”: “€ 4,80”, “allergens”: “A, G, H” }, { “category”: “Minestre”, “name”: “Suppe2”, “description”: “Kürbiscremesuppe mit gerösteten Kürbiskernen und Kürbiskernöl”, “price”: “€ 5,20”, “allergens”: “G, H” }, { “category”: “Minestre”, “name”: “Suppe3”, “description”: “Minestrone mit frischem Gemüse und Kräutern”, “price”: “€ 4,90”, “allergens”: “A, G” }, { “category”: “Antipasti freddi”, “name”: “Antipasti freddi2”, “description”: “Mozzarella mit Tomatenscheiben, Basilikumpesto und getoastetem Brot”, “price”: “€ 8,10”, “allergens”: “A, G, H” }, { “category”: “Antipasti freddi”, “name”: “Antipasti freddi3”, “description”: “Carpaccio vom Rind mit Parmesan und Rucola”, “price”: “€ 9,50”, “allergens”: “G” }, { “category”: “Antipasti freddi”, “name”: “Antipasti freddi4”, “description”: “Marinierte Artischocken und Oliven mit Focaccia”, “price”: “€ 7,80”, “allergens”: “A” } ] }

1 Like

What are you doing exactly? What do you mean by getting this into DB? From where this JSON is coming? When you post JSON on forum, please use the preformatted text (click on +)

pdf to json and then create thing in database

So you are sending the JSON to a backend WF using API Connector?

yes thats what iam doing

You don’t need a plugin for that. What is your issue?

Agree. Issue that iam creating a list of things (category) and the created entries in db are duplicated random everytime a make the call but each category should be created once.

Because you have a racing issue probably. Set enough time for interval in your schedule on a list or process them in loop or first create category and after, create items.

I have done the same thing multiple times. In my use case, I requested api and api is returning me a JSON with question data like below

{
  "content": {
    "question_paragraph": "",
    "question_text": "What is common in Set A = {1, 2, 3, 4} and Set B = {3, 4, 5, 6}?",
    "choices": [
      { "choice_label": "A", "choice_text": "{1, 2}" },
      { "choice_label": "B", "choice_text": "{5, 6}" },
      { "choice_label": "C", "choice_text": "{3, 4}" },
      { "choice_label": "D", "choice_text": "{1, 2, 5, 6}" }
    ],
    "correct_answer": "C"
  }
}


Here are the steps you should use (in my use case).

Step 1. Using regex in Bubble, I extract the Question Text and create a question.
image

Step 2. Create another API workflow for looping that runs based on the number of options. It should create all the options in the database, and I’m also passing the question ID to the options.

If you need more help, feel free to reply here or send me a message.

yes that worked thx