couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: [object Object] instead of string
Date Sun, 15 Jan 2012 14:12:57 GMT
[Object object] is the string form of a json object. try
JSON.stringify(obj) in your view so you can see what you're emitting
by mistake.

On 15 January 2012 06:42, CGS <cgsmcmlxxv@gmail.com> wrote:
> Maybe you should check what you have at that key. It may be it's not what
> you expect (maybe it's a null or bad formatted string).
>
> CGS
>
>
>
> On Sun, Jan 15, 2012 at 5:21 AM, Gabriel de Oliveira Barbosa <
> manobi.oliveira@gmail.com> wrote:
>
>> Anyone have a idea why I'm seeing [object Object] where I expect an string
>> ?
>> I'm running a "_view" with map and reduce that is currently outputting:
>> {
>>    rows: [
>>        {
>>            value: {
>>               * ip: { [object Object]: 2 }*
>>            },
>>            key: '2012-01-14'
>>        },
>>        {
>>            value: {
>>               * ip: { 192.168.1.100: 6 }*
>>            },
>>            key: '2012-01-13'
>>        }
>>    ]
>> }
>>
>> In the second row it's working fine, but all the rest are broken. What I'm
>> doing wrong ?
>>

Mime
View raw message