0

Hi i have some trouble here, im begineer with python. I want to ask how to parse data from firebase like this one. i want to make this data to be a table. If you have any suggest please reply this [1]: https://i.stack.imgur.com/lToZT.png

1 Answers1

0

You can use JSON lib to decode json

In python code you can make like this:

testStr = '''{
    "Value of Pressure": {  
       "-LeHl495vL6vh-8CaLbD": 0,
       "-LeHl6jrhUEMb7slZcpB": 0,
       "-LeHl6jrhUEMb7slZcpS": 20.08,
       "-LeHl6jrhUEMb7slWcpB": 20.08,
       "-LeHl6jrhUEMb9slZcpB": 20.08
   }
}'''

parsedJson = json.loads(testStr)
result = [v for v in parsedJson['Value of Pressure'].values()]
print(result)

Result:

[0, 0, 20.08, 20.08, 20.08]