Hello Bubblers,
I want to create a whole nested JSON at once, when user clicks on event save button.
{
** “eventName”: “”,**
** “eventDesc”: “”,**
** “subcatId”: ,**
** “recurringFrom”: “”,**
** “recurringUntil”: “”,**
** “isPublic”: ,**
** “isActive”: ,**
** “langCode”: “”,**
** “recurringCode”: “”,**
** “sessionStartTime”: “”,**
** “sessionEndTime”: “”,**
** “sessionWeekdays”: “”,**
** “sessions”: [{**
** “sessionName”: “”,**
** “sessionDesc”: “”,**
** “sessionStartsOn”: “”,**
** “sessionEndsOn”: “”,**
** “isCancelled”: ,**
** “numRegistrations”: ,**
** “numSeats”: ,**
** “sessionChannels”: [{**
** “channelCode”: “”,**
** “channelConfig”: “”**
** }],**
** }],**
** “channels”: [{**
** “channelCode”: “”,**
** “channelLink”: “”,**
** “effectiveFrom”: “”,**
** “effectiveUntil”: “”**
** }]**
}
So when we user clicks on save button i want to call the API which accepts whole big nested JSON.
I have set 4 different data types to create this json.
So xan someone tell me how can i create whole json at once for reading each and every value for records.
In this screenshot , i tried using custom state of text data type and whenever i create new things i was creating a JSON as well and appending json to the custom state.
And directly merging one JSON with other is what like this.
I tried doing this using both way, buti feel is whenever user want to createa Save button at last, i want to create the whole JSON at last, which will be having all the updated values.
creating a whole JSON at last for each items of channels and session in database is not getting the exact format of array of objects which i posted in the start of the post.
How can i achieve this? I hope i’m able to explain my requirement.
Thank you.