Trying to get this to work.
I am working with an orderNumber - ORD00028340 for example which is a string.
I imagine I need a function to change this to a number, ie remove ORD, in order for the polling flow to work.
Googling and trying to learn javascript is proving tough, my function keeps getting errors. I am struggling to define the item.
Here is my function - blindly and, mostly dumbly, copied from stack over flow
var str = item.orderNumber;
var chars = str.slice(0, str.search(/\d/));
var numbs = str.replace(chars, '');
console.log(chars, numbs);
return item;
here is the results from the previous node
25
/
1296
JSONTable
[
{
"k1": {
"name": "CATHY",
"csaId": 4810,
"cellNumber": "redacted",
"emailAddress": "redacted"
},
"k2": {
"name": "GREG",
"csaId": 4475,
"cellNumber": "redacted",
"emailAddress": "redacted"
},
"k3": {
"name": "RYAN",
"csaId": 4405,
"cellNumber": "redacted",
"emailAddress": "redacted"
},
"k4": null,
"entryDate": "2021-09-24",
"entryTime": "15:13:14",
"raceName": "2021 PREFISH EVENT",
"orderNumber": "ORD00028340"
},