On 05.03.2020 15:52, David Foley wrote:
> Have the Following Playbook Which Returns the following
>
> ok: [localhost] => {
> "mdb.json": [
The [ is telling us that mdb.json is a list, the fist element in a list
i 0.
> {
> "mac-address": "xx:xx:xx:xx:xx"
> }
> ]
> }
<snip />
> - debug:
> msg: "{{ mdb.json.split(':') }}"
>
> What i would like to Return is just
>
> "msg": "xx:xx:xx:xx:xx"
That would be {{ mdb.json.0['mac-address'] }}
because of the dash in mac-address you need to use [] notation and not
the dot notation on that one.
--
Kai Stian Olstad