Javascript math parser/eval on geojson

I have (in memory) a set of geojson files and would like to execute user defined math function on the properties of the features inside these geojson objects.

E.g. :
SUM([height]) 
AVG([temperature]) * 100
COUNT([users]>10)
etc.

these parameters ([height],etc) are the properties of the features.

I looked at mathjs, but as far as I can see it cannot use existing objects.

Any suggestions?

Arnoud


Source: syntax

Leave a Reply