« first day (71 days earlier)      last day (74 days later) » 

3:38 PM
hi joe
are you there
 
 
2 hours later…
5:39 PM
here we have to create ab_leadas and cp_leads based on a condtion that if 0 and 1 comes for a key then we have to increment the ab_leads, if 2 comes then we have to increment cp_leads. as total_tickets we have to create to new variables
[{'5IVUPHE42HP1NEYvKb7qSvpX2Cm': 1},
{'WL6iHLCgs492rFEFvqewzvCfFfj': 2},
{'5IVUPHE42HP1NEYvKb7qSvpX2Cm': 1},
{'5IVUPHE42HP1NEYvKb7qSvpX2Cm': 2}] for this data i want like
{'5IVUPHE42HP1NEYvKb7qSvpX2Cm': {'ab_leads': 2, 'cp_leads': 1},
'WL6iHLCgs492rFEFvqewzvCfFfj': {'ab_leads': 0, 'cp_leads': 1}}
 
6:29 PM
i have written like this
lists:foldl(fun({Key,Mode},Acc) -> if Mode == 0;Mode == 1 -> orddict:update_counter({Key,<<"ab_leads">>},1,Acc); true -> orddict:update_counter({Key,<<"cp_leads">>},1,Acc) end end,orddict:new(),G).
but with this i am getting like [{{<<"a">>,<<"ab_leads">>},2},{{<<"a">>,<<"cp_leads">>},1}]
 
 
1 hour later…
7:36 PM
Help me for the above phase man
 

« first day (71 days earlier)      last day (74 days later) »