Your code is correct but Object.toString() (which is what you do with the
Ascii part) returns the string you are seeing.

(brevity... phone...)

----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
On Jul 13, 2012 6:42 AM, "Charles Han" <[email protected]> wrote:

> Hi,
>
> I have managed to get an array back from JavaScript within C++. However,
> when I got to access the elements of the array, I got something like this:
>
> [object Object]
> [object Object]
> [object Object]
> ...
>
> Code:
>
>   Array* uncompressed_json_objects = Array::Cast(*uncompressed_result);
>   for(int i =0; i<uncompressed_json_objects->Length(); i++ )
>   {
>     Local<Object> obj = uncompressed_json_objects->Get(i);
>     String::AsciiValue ascii(obj->ToString());
>     printf("%s\n", *ascii);
>   }
>
> What's the method to get values from a V8 array objects? ()
>
> Thanks
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to