list - INSERTINTO Query in python as a String and Display? -
first reading json file:
import json pprint import pprint open('data.json') data_file: data = json.load(data_file) pprint(data)
after reading json file,i want fetch parameters json not all.
like: temperature 1,temperature 2,timestamp
after that; want implement insert query string in 1 list or object , print list.
in insert query, want insert 5 records , display records.
please me out script.
once have json content data variable, can access using name of attribute access index
list_values=[] list_values.append(data['temperature 1']) #add values list print(list_values)
you can treat json values, same way treat dictionary.
Comments
Post a Comment