I have a loop printing a variable and I get this as a result:
{u'jsonrpc': u'2.0', u'result': [{u'hostid': u'000001'}], u'id': 132}
I really only want the host id which in this case is: 000001
Within the python script I am running I have it saved like this:
resultID = {u'jsonrpc': u'2.0', u'result': [{u'hostid': u'000001'}], u'id': 132}
print resultID
Is there anything I can do to only print out the hostid?
As a side not the hostid's are not always the same length.