You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by bryan rasmussen <ra...@gmail.com> on 2011/02/03 10:18:22 UTC

can I configure couchdb to output an object with variable name?

In other words instead of being
{"objectname" : "value"}

it returns

var myobj = {"objectname" : "value"}

Thanks,
Bryan Rasmussen

Re: can I configure couchdb to output an object with variable name?

Posted by Stefan Matheis <ma...@googlemail.com>.
Bryan, what exactly are you talking about?

On Thu, Feb 3, 2011 at 10:18 AM, bryan rasmussen
<ra...@gmail.com> wrote:
> In other words instead of being
> {"objectname" : "value"}
>
> it returns
>
> var myobj = {"objectname" : "value"}
>
> Thanks,
> Bryan Rasmussen
>

Re: can I configure couchdb to output an object with variable name?

Posted by bryan rasmussen <ra...@gmail.com>.
Thanks,  I start from here
http://wiki.apache.org/couchdb/Formatting_with_Show_and_List I guess
and ask for help if I run into any problems :)

On Thu, Feb 3, 2011 at 11:03 AM, George Burt <im...@gmail.com> wrote:
> You could use either a "show" or a "list" to transform the JSON
> ({"objectname" : "value"}) into the javascript (var myobj = {"objectname" :
> "value"}) you indicate.  Let me know if you need an example.
>
> - George
>
> On Thu, Feb 3, 2011 at 4:18 AM, bryan rasmussen
> <ra...@gmail.com>wrote:
>
>> In other words instead of being
>> {"objectname" : "value"}
>>
>> it returns
>>
>> var myobj = {"objectname" : "value"}
>>
>> Thanks,
>> Bryan Rasmussen
>>
>

Re: can I configure couchdb to output an object with variable name?

Posted by George Burt <im...@gmail.com>.
You could use either a "show" or a "list" to transform the JSON
({"objectname" : "value"}) into the javascript (var myobj = {"objectname" :
"value"}) you indicate.  Let me know if you need an example.

- George

On Thu, Feb 3, 2011 at 4:18 AM, bryan rasmussen
<ra...@gmail.com>wrote:

> In other words instead of being
> {"objectname" : "value"}
>
> it returns
>
> var myobj = {"objectname" : "value"}
>
> Thanks,
> Bryan Rasmussen
>