这是数组数据
{"start":"20160530T164500",
"end":"20160530T173000",
"rule":"FREQ=WEEKLY;BYDAY=MO,WE",
"summary":"Meeting on Monday/wed"}
我必须阅读规则参数,并基于一天,需要如下创建行
例如,它具有MO,WE,因此需要2个数组行,如下所示
{"day":"MO","start":"20160530T164500","end":"20160530T173000","rule":"FREQ=WEEKLY;BYDAY=MO,WE","summary":"Meeting on Monday/wed"}
{"day":"WE","start":"20160530T164500","end":"20160530T173000","rule":"FREQ=WEEKLY;BYDAY=MO,WE","summary":"Meeting on Monday/wed"}
javascript / array方面的专家...请提出任何建议...
最佳答案
let data = {"start":"20160530T164500","end":"20160530T173000","rule":"FREQ=WEEKLY;BYDAY=MO,WE","summary":"Meeting on Monday/wed"};
let result = data['rule'];
let ans = result.split("=");
其中应包含
WEEKLY;BYDAY=MO,WE
每周;并且BYDAY = MO,WE关于javascript - 从给定的数组输入创建arraylist,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42611100/