{
"nodes": {
"status": -1,
"imdata": [
{
"fabricNode": {
"attributes": {
"status": "",
"dn": "topology/pod-1/node-1",
"name": "NOQCJALAB1"
}
}
},
{
"fabricNode": {
"attributes": {
"status": "",
"dn": "topology/pod-1/node-1",
"name": "NOQCJALAB2"
}
}
}
],
"totalCount": 2,
"changed": false,
"failed": false
},
"changed": false,
"_ansible_verbose_always": true,
"_ansible_no_log": false
}
- set_fact: new_var: "{{ your_var | json_query('nodes.imdata[*].fabricNode.attributes.{dn:dn,name:name}') }}"
[ { "dn": "topology/pod-1/node-1", "name": "NOQCJALAB1" }, { "dn": "topology/pod-1/node-1", "name": "NOQCJALAB2" } ]
--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/72ef3632-4fd3-4f9b-9a1f-6901202cca33%40googlegroups.com.
new_var: "{{ your_var | json_query('nodes.imdata[*].result[*].fabricNode.attributes.{dn:dn,name:name}') }}"
To unsubscribe from this group and stop receiving emails from it, send an email to ansibl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/72ef3632-4fd3-4f9b-9a1f-6901202cca33%40googlegroups.com.