Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello there,
I have this code:
for (var x = 0; x <me.kpis.length; x++) {
var line=me.kpis[x].Line;
var json_yt = Things["Name of Things"].GetKpis({
Lines: line,
_timeOption:"Yesterday"
});
var json_yt = Things["Name of Things"].GetKpis({
Lines: line,
_timeOption:"All month"
});
if(line.includes("line1")) {
var kpis_value_yt_value =json_yt.array.filter(x=>x.kpis)[0]["kpis"];
I want to get Kpis from json_yt but when I try to get data from there I have a message:
Solved! Go to Solution.
I found a way to filter.
if (json_yt.array[0] == undefined ) {
continue;}
I make an if and for me it was a problem because always I put null, but must check what the value return your array.
Thank anyway.
I found a way to filter.
if (json_yt.array[0] == undefined ) {
continue;}
I make an if and for me it was a problem because always I put null, but must check what the value return your array.
Thank anyway.