built-in method values of dict object a

499 views
Skip to first unread message

Kumarswamy veeranna

unread,
Feb 3, 2022, 7:43:02 AM2/3/22
to Ansible Project
Hi All,

I'm facing an issue with extract the value from the below ansible code

item.content.values() 

['sp.*.cpu.summary.utilization', '2022-02-02T10:30:00.000Z', 300, {'spa': 10.777033477143537}]

but fetching the SPA is not happening

Tried with "item.content.values().[3].spa"

Brian Coca

unread,
Feb 3, 2022, 11:17:27 AM2/3/22
to Ansible Project
extra dot

"item.content.values()[3].spa"

either use dot notation or bracket for each segment, cannot use both
at same time



--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages