AnsweredAssumed Answered

PDS - return name with spaces

Question asked by DCAlmeida on Aug 29, 2014
Latest reply on Aug 29, 2014 by DCAlmeida

Hi there.

 

I am getting an error or a problem using a pds on ntservices probe.

 

This is a portion of my code, I think this could be enough to troubleshooting and understand the problem.

 

args = pds.create()

cfg,rc = nimbus.request(robotaddr.."/ntservices", "list_profilestatus", args)

if rc == 0 then

   for id,tab in pairs(cfg) do

     for key,value in pairs(tab) do

            print(value.name)

            print(value.expected state) -- I am getting the error on this line

    end

  end

end

 

So, the name of the key is "expected state", contains spaces and I cannot retrieve data. The value.name or value.state works fine.

How can I handle this?

 

Thanks in advance.

Outcomes