Parsing output

I have the following output from my debug (using “find”, and the debug output for “files”)

`
{
“atime”: 1503588437.3974097,
“ctime”: 1503588433.7234097,
“dev”: 2051,
“gid”: 0,
“inode”: 21408,
“isblk”: false,
“ischr”: false,
“isdir”: false,
“isfifo”: false,
“isgid”: false,
“islnk”: false,
“isreg”: true,
“issock”: false,
“isuid”: false,
“mode”: “0644”,
“mtime”: 1503588433.7194097,
“nlink”: 1,
“path”: “/etc/sysconfig/network-scripts/ifcfg-enp0s3”,
“rgrp”: true,
“roth”: true,
“rusr”: true,
“size”: 278,
“uid”: 0,
“wgrp”: false,
“woth”: false,
“wusr”: true,
“xgrp”: false,
“xoth”: false,
“xusr”: false
}

`

I need to parse out /etc/sysconfig/network-scripts/ifcfg-enp0s3 (or maybe even just ifcfg-enp0s3) from the above output.... how would I go about doing that?

I think you have left out something of the output since find can return more
than one answer it always return a list.

So if you use register: result on the find you can always do this.

- debug: msg='Found file: {{ item.path }}'
  with_items: '{{ result.files }}'

Perfect. Thank you.