# listing JSON first level keys name

**URL:** <https://forum.ansible.com/t/listing-json-first-level-keys-name/22482>\
**Category:** Ansible Project\
**Created:** [September 5, 2016, 8:34am UTC](https://forum.ansible.com/t/listing-json-first-level-keys-name/22482 "2016-09-05T08:34:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alix\_Ak](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Alix\_Ak](https://forum.ansible.com/u/Alix_Ak)\
**Post date:** [September 5, 2016, 8:34am UTC](https://forum.ansible.com/t/listing-json-first-level-keys-name/22482/1 "2016-09-05T08:34:34Z")

</div>

Hallo,

Example :  
{  
“fw1”: {  
“ipv4”: {  
“rtr”: {

“ip”: “1.2.3.4”,  
“net”: “1.2.3.4”,

}  
}  
},  
“fw2”: {  
“ipv4”: {  
“rtr”: {  
“ip”: “4.3.2.1”,  
“net”: “4.3.2.1”,

}  
}  
}  
}

I need to parse the first level keys of a json file. Using ‘from\_json).keys()’ i get a strange syntax → [u’fw1’, u’fw2’].  
How do the ‘u’ characters come from and how to get rid of them ? Is there any way to list the keys instead of getting them in an Array ?
