Coerce a whole submission against a field-type map. Unknown keys pass through untouched; mapped keys are coerced (and dropped if unparseable). Pair it with the field names/types from your FlowDraft.
FlowDraft
const data = coerceSubmission(submission, { budget: "number", preferred_date: "date", interests: "stringArray",}); Copy
const data = coerceSubmission(submission, { budget: "number", preferred_date: "date", interests: "stringArray",});
Coerce a whole submission against a field-type map. Unknown keys pass through untouched; mapped keys are coerced (and dropped if unparseable). Pair it with the field names/types from your
FlowDraft.