Try piping thru "from_json | to_json" or just "to_json" filter. One of those 
worked for me. Cannot remember which one.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

On Jan 25, 2023, at 2:39 AM, Linux Study <linuxstu...@gmail.com> wrote:

Hello All,

I want remove bracket and u from json data in ansible. I am trying to retrieve 
data from json.
 I executed this code in playbook

- debug:
       msg: "{{ item }}"
    loop:  "{{ raidurl1 | json_query('json.Members[*].[*]') }}"

I am getting output like

(item=[[u' /refish/v1/Systems/1']])

But i want output like
 (item= /redfish/v1/Systems/1 )


How can i remove bracket and u from item. Do i need to change anything in to 
debug loop? Please help


Thanks and regards,
Abhi

--
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
ansible-project+unsubscr...@googlegroups.com<mailto:ansible-project+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEcjLFwnqUC727hEDyW%2BoAiM%2B7hCOm3sNcA-oQ54JNvvHYob6A%40mail.gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2FCAEcjLFwnqUC727hEDyW%252BoAiM%252B7hCOm3sNcA-oQ54JNvvHYob6A%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cf62aaabba5944829e5f008dafeae493d%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638102321765114472%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BrgIRTPaLD3v9OIxirufajTMiCz%2Ffy1azgA0y1z%2BshM%3D&reserved=0>.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/757E593A-9436-4CA5-A795-C9473E0985DA%40nist.gov.

Reply via email to