I have a ndjson file where each line describes an order:
Like this:
{"id": 6, "date": 15082021, "items": [{"id": 0, "name": "Smart TV", "price": 40}, {"id": 8, "name": "Smartphone", "price": 200}], "customer": {"id": 20, "name": "David Mexclar", "country": "Hungary"}}
I need to read the ndjson file and append each line in a list. So I can then easily do something like this:
orders[0]["customer"]["name"]
// output = David Mexclar
What is the best way to go about it please?
Thank you for any help!