I am getting some data from a JSON file \"new.json\", and I want to filter some data and store it into a new JSON file. Here is my code:
import json with ope
If you want to solve it in a two-liner you can do it like this:
with open('data.json') as f: data = [json.loads(line) for line in f]