Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun({Doc}) ->
- DocType = couch_util:get_value(<<"type">>, Doc),
- L = [1, 2, 3, 4],
- M = #{<<"id">> => <<"1234">>, <<"brand">> => <<"value one">>, <<"a">> => <<"1">>},
- case DocType of
- <<"installedbaselocation">> ->
- DocInstalledbase = couch_util:get_value(<<"installedbase">>, Doc),
- lists:foreach(fun(E) ->
- Id = 1, % lists:last(<<"id">>, tuple_to_list(E)),
- Emit(Id, E)
- end, DocInstalledbase);
- _ -> false
- end
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement