Skip to content

Commit

Permalink
Fix incorrect spec for kz_json:filter/3 (#6666)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfordben authored Nov 10, 2020
1 parent c0cc08d commit 379fb89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/kazoo_stdlib/src/kz_json.erl
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ get_ne_json_value(Key, JObj, Default) ->
filter(Pred, ?JSON_WRAPPER(Prop)) when is_function(Pred, 1) ->
from_list([E || {_,_}=E <- Prop, Pred(E)]).

-spec filter(filter_pred(), object(), path()) -> object() | objects().
-spec filter(filter_pred(), object(), get_key()) -> object() | objects().
filter(Pred, ?JSON_WRAPPER(_)=JObj, Path) when is_list(Path),
is_function(Pred, 1) ->
Filtered = filter(Pred, get_json_value(Path, JObj)),
Expand Down

0 comments on commit 379fb89

Please sign in to comment.