JSBool JS_ValueToObject()

Usage

JSBool JS_ValueToObject(JSContext *cx, jsval v, JSObject **op); 

Description

Method; extracts a function argument from a jsval structure, converts it to an object (if possible), and passes the converted value back to the caller. If the object is an array, use JS_GetArrayLength() and JS_GetElement() to read its contents.

Arguments

JSContext *cx, jsval v, JSObject **op

Returns

A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.