'How to convert json to array, associated value and save it as .csv

i was confused with my project use firebase as db to collect sensor data and then do lstm, im newbie in python and code. How to convert json file to array and then associated the value and the last one is save file as .csv. Thanks for help. Here is my code:

Data from db
Data from db `

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import json
from google.colab import files
uploaded = files.upload()
data = next(iter(uploaded.values()))
type(data)
json.loads(data.decode("utf-8"))
df=json.dumps(data.decode("utf-8"))
df2 = json.loads(df)

`



Sources

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

Source: Stack Overflow

Solution Source