code: function parseJson(pred) {
      return B (filter (pred)) (B (eitherToMaybe) (encase (JSON.parse)));
    }
docs: # parseJson :: (Any -> Boolean) -> String -> Maybe a . . Takes a predicate and a string that may or may not be valid JSON, and . returns Just the result of applying `JSON.parse` to the string *if* the . result satisfies the predicate; Nothing otherwise. . . ```javascript . > S.parseJson (S.is ($.Array ($.Integer))) ('[') . Nothing . . > S.parseJson (S.is ($.Array ($.Integer))) ('["1","2","3"]') . Nothing . . > S.parseJson (S.is ($.Array ($.Integer))) ('[0,1.5,3,4.5]') . Nothing . . > S.parseJson (S.is ($.Array ($.Integer))) ('[1,2,3]') . Just ([1, 2, 3]) . ```