Complex JSON Data in POST API.

Database & APIs

Hello, Community I was creating a School management Software Web using FlutterFlow, and I am stuck at the point where I have to frame a complex JSON data dynamically, and POST it into the post API. Is there any method or any feature in FlutterFlow to do this ?

This is the UI of the Data in this the Table Input is generated dynamically. The problem I am facing is, how can I track the individual input data, and parse is in the JSON body of the API.

Please do help me with this, I am stuck .

here is the example of the JSON data. which I have to frame and POST.

{
  "fee_terms": [
    "Apr 2024",
    "May 2024",
    "Jun 2024",
    "Jul 2024",
    "Aug 2024",
    "Sep 2024",
    "Oct 2024",
    "Nov 2024",
    "Dec 2024",
    "Jan 2025",
    "Feb 2025",
    "Mar 2025"
  ],
  "classes": [
    "I",
    "II",
    "III",
    "IV",
    "IX",
    "V",
    "VI",
    "VII",
    "VIII",
    "X",
    "XI",
    "XII"
  ],
  "streams": ["ARTS", "COMMERCE", "SCIENCE BIOLOGY", "SCIENCE MATHEMATICS"],
  "fee_types": [
    {
      "boarding_type": "BPL",
      "amounts": [
        {
          "fee_type": "DEVELOPMENT FEE",
          "amount": 0
        },
        {
          "fee_type": "EXAM FEE",
          "amount": 0
        },
        {
          "fee_type": "LIBRARY FEE",
          "amount": 0
        },
        {
          "fee_type": "SPORTS FEE",
          "amount": 0
        },
        {
          "fee_type": "TUITION FEE",
          "amount": 0
        }
      ]
    },
    {
      "boarding_type": "DPS STAFF",
      "amounts": [
        {
          "fee_type": "DEVELOPMENT FEE",
          "amount": 50
        },
        {
          "fee_type": "EXAM FEE",
          "amount": 100
        },
        {
          "fee_type": "LIBRARY FEE",
          "amount": 50
        },
        {
          "fee_type": "SPORTS FEE",
          "amount": 50
        },
        {
          "fee_type": "TUITION FEE",
          "amount": 500
        }
      ]
    },
    {
      "boarding_type": "GENERAL",
      "amounts": [
        {
          "fee_type": "DEVELOPMENT FEE",
          "amount": 500
        },
        {
          "fee_type": "EXAM FEE",
          "amount": 1000
        },
        {
          "fee_type": "LIBRARY FEE",
          "amount": 500
        },
        {
          "fee_type": "SPORTS FEE",
          "amount": 500
        },
        {
          "fee_type": "TUITION FEE",
          "amount": 5000
        }
      ]
    },
    {
      "boarding_type": "MECON",
      "amounts": [
        {
          "fee_type": "DEVELOPMENT FEE",
          "amount": 50
        },
        {
          "fee_type": "EXAM FEE",
          "amount": 100
        },
        {
          "fee_type": "LIBRARY FEE",
          "amount": 50
        },
        {
          "fee_type": "SPORTS FEE",
          "amount": 50
        },
        {
          "fee_type": "TUITION FEE",
          "amount": 500
        }
      ]
    }]

What have you tried so far?

I have Defined the API call and used Choice Chips and CheckBox to I am passing the Widget State as the Variable. I am able to pass the Above checkboxes data, but unable to do with the Table input form.

Did you check FlutterFlow's Documentation for this topic?
Yes
3
3 replies