I have an object in the following format:
const input = {
"recurrence": {
"rrule": [
"RRULE:FREQ=DAILY;UNTIL=20230606T133000Z"
],
}
};
I want to extract the value of FREQ
to check if its value is DAILY
or YEARLY
and to get the value of UNTIL
as well.
2
Answers
Your code may look like this:
Using regex here to extract the value of FREQ and UNTIL from string.