Hi John,

The standard procedure generally is a GET-modify-PUT cycle, one document
at a time.

Remember that _all_docs is basically a built in view. You're presumably
adding include_docs=true to that view request to get the format you're
seeing (or your client is doing this for you).

A simple:

doc = doc.doc

or equivalent in your language should limit scope to just the document
itself.

Good luck,
Joan

----- Original Message -----
> From: "John Le Brasseur" <[email protected]>
> To: [email protected]
> Sent: Sunday, February 12, 2017 10:19:42 AM
> Subject: Getting, editing and (re-)Posting docs to update them:
> 
> Hi.
> I am getting(GET) all the docs from my database in order to try and
> update
> certain data in all of them and then POST the edited docs to update
> the
> database.
> 
> 
> However, the documents contain extra data which looks like this:
> 
>  "id": "d8d006c66c0e4555bf12e5d086003010",
>       "key": "d8d006c66c0e4555bf12e5d086003010",
>       "value": {
>         "rev": "28-38526f3787b1fcedc82624419709c347"
>       },
>       "doc": { ....
> 
> 
> This is followed by the actual document:
> 
>  "_id": "d8d006c66c0e4555bf12e5d086003010",
>  "_rev": "28-38526f3787b1fcedc82624419709c347",
>         ...........etc.
> 
> 
> 
> Is there a way to get output without this data added?
> 
> If not I presume one must remove this manually every time one wishes
> to
> edit documents.
> 
> Many thanks.
> 
> John
> 

Reply via email to