Answered
Can't send array from CEP panel to JSX
I am not abel to send a array between JS and JSX in my CEP panel using JSON.stringify. The JSX function doeasnt get called at all. The alert below doesn't come through.
If i don't use JSON.stringify the array gets send not as an array but just comma seperated vaules. The array structure is lost.
My JS function
function generateList() {
var ruleData = [["filename","doesntcontain","kkk"], ["clipname","doesntcontain","kkk"]]
var andor = "and";
if (document.getElementById("andor-select2").checked) {
andor = "or"
}
if (ruleData === "Error") {
return;
}
var ruleDataStr = JSON.stringify(ruleData)
console.log(ruleDataStr)
var csInterface = new CSInterface();
csInterface.evalScript('searchTimeline("' + ruleDataStr + '", "' + andor + '")')
}My JSX function
function searchTimeline (ruleData, andor) {
alert("here")}
Any suggestions?
