Untitled

mail@pastecode.io avatar
unknown
javascript
5 months ago
309 B
3
Indexable

const ticketInput = inputData.ticket_id || '';

// Use a regular expression to extract the ticket ID after the colon
const match = ticketInput.match(/support:(.*)/);

// Prepare the output object with the extracted ticket ID or a fallback if not found
output = {
  ticket_id: match ? match[1].trim() : ''
};
Leave a Comment