Skip to content

Instantly share code, notes, and snippets.

@mkeen
Created May 10, 2010 20:58
Show Gist options
  • Save mkeen/396537 to your computer and use it in GitHub Desktop.
Save mkeen/396537 to your computer and use it in GitHub Desktop.
fun({Doc}) ->
DocumentID = proplists:get_value(<<"_id">>, Doc, null),
case DocumentID == <<"campaigns">> of
true ->
AdwordsCampaigns = proplists:get_value(<<"adwords">>, Doc, null),
[Emit(DocumentID, Campaign) || Campaign <- AdwordsCampaigns];
false -> ignore
end
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment