Extract the json object from the response

When you submit headless adaptive form to an custom submit handler, the data returned by the submit handler can be extracted and displayed in your react app. The following code snippet shows

// associate event handler for the onSubmitSuccess event
<AdaptiveForm mappings={extendMappings} onSubmitSuccess={onSuccess} formJson={selectedForm}/>
// extract the json returned by the custom submit service
const onSuccess=(action) =>{
        let body = action.payload?.body;
        let FirstName = JSON.parse(body.metadata.json).firstName;
        setThankYouMessage(FirstName+" your request has been received");

      }
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69