How can I average numbers from the database?
Using some some of the cases in already on the forum, I was able to figure this out to some extent but I am getting an end result of NaN. I am not sure why it is not a number though. To me it should be.
Here I map the weights to a number array.
Here is how that LSV is set up.
Then in the success of the mapping, I run this javascript. Notice that I have an array commented out. If I use that array instead of the one that is saved as a LSV, the average works as expected.
This is the result of the above code. I get NaN but I don't know why.
Do you have any ideas as to why my database numbers that are stored as the number type are remaining numbers in the array?