Basic question - string manipulation

Hi everyone,

i have a simple question, i have below code:

def initialize() {
log.debug “Initialized with settings: ${settings}”

// Pull the latest device info into state

settings.devices.value.each {
	def deviceId = it
    log.debug **deviceId.value.lastIndexOf("_")**

and it got error:

java.lang.SecurityException: Getting properties on class [C is not allowed @ line

do you have any idea? i have to do string operation on my deviceID e.g substring, lastindexof, etc…

Thank you,

Apologise for question :smile:

problem solved…
settings.devices.value.each {
should be
settings.devices.each {