Thanks again for all your answers. I now can print out the objects array
content using JSON.stringify.
BTW, are the JSON.parse and JSON.stringify built into the V8 lib? so I
don't have to have the javascript file.
On Friday, 13 July 2012 16:42:14 UTC+12, Charles Han 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