Created
February 15, 2010 15:40
-
-
Save davidcoallier/304740 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Map Function | |
%% Thanks to Adam Kocoloski (@kocolosk) for this compacted version | |
fun({Doc}) -> | |
case {proplists:get_value(<<"name">>, Doc), proplists:get_value(<<"value">>, Doc)} of | |
{undefined, _} -> | |
ok; | |
{_, undefined} -> | |
ok; | |
{Name, Value} -> | |
Emit(Name, Value); | |
_ -> | |
ok | |
end | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment