Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: sutanu on March 27, 2017, 11:13:35 AM
-
Function: _genesys.session.getListItemValue(Transaction_List, Section) returns an OBJECT of key/value pairs: {Key1:value1, Key2:Value2, ..}
I am getting a string by using valueOf() function but not able to print in log from ECMAScript to check the string format.
If anyone has any idea how to store the each KVP info in a string array in ECMAScript.... Please help.
Thanks in advance.
-
The object you are seeing is a JSON object.
To log the object as text __Log( JSON.stringify( <object var> ))
If there is a kv pair with the key of MyKey you can access it by <object var>.MyKey
var obj = _genesys.session.getListItemValue(Transaction_List, Section) ;
__Log( JSON.stringify( obj ));
var myVar = obj.MyKey;
-
Thanks a lot Mike :)