public static double?GetAvg(string jsonData, string expression) { JSONQuerySelector json = new JSONQuerySelector(); var results = json.SearchValue(jsonData, expression); Calculator calculator = new Calculator(); return(calculator.GetAverage(results)); }
public static int GetCount(string jsonData, string expression) { JSONQuerySelector json = new JSONQuerySelector(); var results = json.SearchValue(jsonData, expression); Calculator calculator = new Calculator(); return(calculator.GetCount(results)); }
public static Nullable <T> GetMax <T>(string jsonData, string expression) where T : struct { JSONQuerySelector json = new JSONQuerySelector(); var results = json.SearchValue(jsonData, expression); Calculator calculator = new Calculator(); var max = calculator.GetMax(results); return(max.SafeCast <T>()); }
public static object GetValue(string jsonData, string expression) { JSONQuerySelector json = new JSONQuerySelector(); return(json.SearchValue(jsonData, expression)); }