Im trying to fix this split of a string into 5 different values. The separators are unique (but I am not very good with code). Only get this error when I try this:
var content = inputData.content;
var Customer = content.split("*Customer: *"))1].split(" *M"))0].trim();
var MRR = content.split("RR: * "))1].split("*Cancellation "))0].trim();
var Termination = content.split("date: * "))1].split(" *Order en"))0].trim();
var Churn = content.split("d date: * "))1].split(" *Rea"))0].trim();
var Reason = content.split("son: * "))1].split(""))0].trim();
output = {content, Customer, MRR, Termination, Churn, Reason}];
This is the input string im trying to split:
*Churn* submission from @xx.xxx *Customer: * Name of customer *MRR: * 59390 *Cancellation date: * 02/11/22 *Order end date: * 14/11/23 *Reason: * Low activity / Never Active *Other: * "Reason for termination"
How do I define the parts of the string?