'Grab the first entry from json [duplicate]

I apologize ahead im really bad at explaining things.

I have a variable with json data in it, the first entry in this json data will change but i need too be able too call the first entry similar too how dictionairys work with dictionairy[0]. Is this possible?



Solution 1:[1]

if that what you mean:

>>> example = {"a": 1, "b": 2}
>>> first_key = list(example.keys())[0]
>>> example[first_key]
1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ItayB