Given an API that returns a jsonl
, how can I manipulate the data that I obtain?
What if the API gives me data like this:
{"plate": "pizza", "quantity": 3}
{"plate": "pasta", "quantity": 2}
- In javascript the object retrieved what type will have?
- If I want to add a new object, to have a result like:
{"plate": "pizza", "quantity": 3}
{"plate": "pasta", "quantity": 2}
{"plate": "hotdog", "quantity": 7}
How can I do that maintaining the type .jsonl
and not creating and array?
Thanks a lot for the help