jsbeans.Iterator
(
object
,
[parserFunction]
)
- Parameters:
-
object <Object>any object that supports thefor indirective. -
[parserFunction] <Function>a custom function to format each element returned bynext.
parserFunctionwill be called with property name as first argument and property value as second one.
If not set orparserFunctionis not a Function the default parser will be used (seenextmethod).
Please, note that error handling is up to developer since thecatchblock on each step is empty.
To return a JSON in the format{name: itemName, value: itemValue}usejsbeans.Iterator.JSON_FORMAT