Group By will require a reduce function which does the following
Input: [{Country1:[obj1, obj2..], Country2:[[obj3, obj4]},
{Country1:[[obj5, obj6], Country3:[[obj7, obj8]}
Output: [{Country1:[obj1, obj2,obj5, obj6], Country2:[[obj3,
obj4], Country3:[[obj7, obj8]}]
--
Yousuf
On Mon, Jul 9, 2012 at 11:57 AM, Venki Yedidha
<[email protected]>wrote:
> Hi All,
> Can anyone help me how I can use group by function in Riak map
> function written in javascript.
>
> I just want to group by Country where my key value is my Country name.
>
> return [obj]; // works fine
>
> return [{value.key : [obj]}] // Not working
>
> obj is a json object.
>
> Thanks,
> Venkatesh.Y
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com