where method

JsonMap where(
  1. bool test(
    1. String k,
    2. D v
    )
)

returns a map that only contains items that conform to test

Implementation

JsonMap where(bool Function(String k, D v) test) {
  JsonMap m = {};
  forEach((k, v) {
    if (test(k, v)) m.putIfAbsent(k, () => v);
  });
  return m;
}