MongoDB command failure

Hello

I am trying to use the Mongodb components but I have some trouble with the Run MongoDB Command

Here is the command

{

group: {

        ns: 'projects',

        key: {ProjectID: 1},

        \$reduce: function(c,r) { if (r.regDate < c.registrationDate) r.regDate = c.registrationDate},

        initial: { regDate: ''}

       }

}

and the failure message is

CMongoDBRunCommand::onProcess: Failure parsing JSON string near: group: {

-> 'Run MongoDB Command' ('Run MongoDB Command'); Location: 5 - error during Data Record Processing phase

CProtocolStd::onProcess: Pipeline Pilot exception rethrown

CProtocol::onProcess: Pipeline Pilot exception rethrown

CComponentRunner::CallOnProcess: exception caught, calling onFinalize before rethrow

Protocol MIP List of Projects, user u002541: Pipeline Pilot exception caught

Protocol MIP List of Projects, user u002541: Protocol failed: Pipeline Pilot error

Pipeline Pilot Server version 9.0.2

Server OS: Windows Server 2008 R2 Service Pack 1

When I am doing the same in the Mongo shell I have no problem

> mydb.runCommand( { group: { ns: 'projects', key: {ProjectID: 1}, \$reduce: func

tion(c,r) { if (r.regDate < c.registrationDate) r.regDate = c.registrationDate},

initial: { regDate: ''} }});

{

        "retval" : [

                {

                        "ProjectID" : "PRJ61",

                        "regDate" : "2013-10-09T15:28:12.319+02:00"

                },

                {

                        "ProjectID" : "PRJ4",

                        "regDate" : "2013-10-09T15:28:05.674+02:00"

                }

                ...

I don't know what I have to do in order to make the json valid for the component. Maybe somebody have had the same problem and can help me ?

Thanks

Frédéric