You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the issue is because only one element matches the array filter condition, so it tries to evaluate sum(1), which returns a Null node.
Side question: For eval functions that return a numerical value, what should I expect if none of the elements match the filter condition? 0 or Null node?
The text was updated successfully, but these errors were encountered:
Joey29-1
changed the title
Eval sum() and avg() does not return return answer after filtering array
Eval sum() and avg() does not return right answer after filtering array
Jun 14, 2024
Side question: For eval functions that return a numerical value, what should I expect if none of the elements match the filter condition? 0 or Null node?
Depends on the request. The Eval function can return Null or Error with the wrong type of Node.
Here, sum and avg will return Null, but if the array of strings is given, then the error wrong type of Node.
The
sum()
andavg()
function inEval()
does not return the correct answer if the array of objects is filtered.I believe the issue is because only one element matches the array filter condition, so it tries to evaluate
sum(1)
, which returns aNull
node.Side question: For eval functions that return a numerical value, what should I expect if none of the elements match the filter condition?
0
orNull
node?The text was updated successfully, but these errors were encountered: