Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: nonny on September 18, 2015, 05:53:23 AM
-
If I have a list that contains a "sub-list", what is the correct key syntax to be able to access items in that sub-list using ListGetString (IRD)? Is it as simple passing in 1.1, Key.SubKey?
-
Yes
-
This isn't working. Just getting a blank list variable. Should I be using some other function?
-
GetStringKey['key.subkey', list]
-
That's not working either. I've tried the keyname.subkeyname and the keyinteger.subkeyinteger but each time I just get an empty value back.
If it helps, here is the list variable contents:
_I_I_007802703976d02c [09:04] ASSIGN: var_ws02_results_list(LOCAL) <- LIST: {
"accountId" : "100001301",
"type" : "1",
"category" : "2",
"profile":{
"title":"MR",
"firstName":"TEST",
"lastName":"USER",
"email": "",
"phone":"7 573-5555",
"businessPhone":"",
"mobile":"",
"serviceAddress":" 87 SOMEWHERE AVE\n\nTHE TOWN 3119",
"billingAddress":"87 SOMEWHERE AVE\nTHE TOWN 3119\n\n"
},
"statement":{
"balance":0,
"dateDue":"2013-12-05T00:00:00.000+13:00",
"inArrears":false,
"inCreditControl":false
}
}
-
Not sure how you make URS to print list in JSON format, usually it uses other way to present lists.
What version you using and do you play in strategy with run time modes (SetRunTimeMode function, run_time_mode option) specifcally with values 128, 1024?
In any way I don't think regular List functions understand JSON.
If JSON is involved you probably can try KVList functions, something like
KVListGetStringValue[var_ws02_results_list, 'profile.firstName']
-
The list is populated from a REST API Web Service - assigned to a List variable.
-
Up to my knowledge source of list object doesn't matter.
If strategy doesn't play with run time modes then both
"GetStringKey" and KVListGetStringValue should work.
If it plays then it depends from which exactly modes are used.