couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <>
Subject Re: couchdb modify the json object
Date Wed, 01 Jun 2011 19:50:38 GMT
On 2 June 2011 00:56, Sujan Dutta <> wrote:
> I am new to couchdb and i have a problem now
> well i have a date field which i am putting it as
> "createddate":"\\/Date(-684302343434)\\/"
> but it is storing in doc as
> "createddate":"/Date(-684302343434)/"
> how do i could solve this problem ?

Hi Sujan,

You are not escaping correctly. Also the date format seems unusual.

I think you wanted to have the final JSON like this:

    "createddate":  "Date(-684302343434)"

In which case, use -d '{"createddate":"Date(-684302343434)"}' instead.
the single quotes should be enough here, and escaping " needs to be
done \" not "\ or \\

It helps if you provide "what I did, what I expected, what I got" here.

Where does your date format come from? If you store a valid
javascript/JSON formatted date you can ask CouchDB to sort/filter on
this. Check out


View raw message