Caplin Trader 4.7.1

Class: module:caplin/element/parser/KeyValueParser

module:caplin/element/parser/KeyValueParser

Constructor

new module:caplin/element/parser/KeyValueParser()

Substitues a mapped value with a value if the a mapped value exists otherwise it returns the value itself. The mAttributes argument should have the map holding the mappings in it's map key.
Implements:

Methods

parse(vValue, mAttributes)

Substitues a mapped value with a value if the a mapped value exists otherwise it returns the value itself.
Parameters:
Name Type Description
vValue Variant the value which is expected to be mapped to a key in mAttributes.map
mAttributes Map the object which holds a map of key-value pairs in its "map" element.
Returns:
the found key for the value or the value if the key was not found.