How to fetch dict data from a list item

5 views
Skip to first unread message

chtsalid

unread,
Mar 19, 2021, 9:45:30 AM3/19/21
to Ansible Project
Hi all,

I am having a problem to fetch dict from a list in this example list item lldpNeighbors. How can we achieve this?
Here is the output I am getting.

ok: [vEOS1] => {
    "lldp_output.stdout": [
        {
            "lldpNeighbors": [
                {
                    "neighborDevice": "vEOS2.fritz.box",
                    "neighborPort": "Ethernet1",
                    "port": "Ethernet1",
                    "ttl": 120
                }
            ],
            "tablesAgeOuts": 0,
            "tablesDeletes": 0,
            "tablesDrops": 0,
            "tablesInserts": 1,
            "tablesLastChangeTime": 1616079454.6630714
        }
    ]
}

Thanks a lot in advance!
Reply all
Reply to author
Forward
0 new messages