evaluatePredicate function
Implementation
bool evaluatePredicate(dynamic predicate, dynamic item) {
return (predicate is Function && predicate(item)) ||
((item is Map && predicate is String && isTruthy(item[predicate])) ||
isEqual(item, predicate));
}