How to import json data into Firestore
Transfer old data into Google Firestore
Firestore is a popular database for development on iOS, Android, Java, Node, Python, GO, but I mainly use it for Angular web apps. In this tutorial, I will show how you can migrate your initial database into Firestore.
The Problem
If you follow the getting started tutorial for Angular, you will build the “Tour of Heroes” app, but the hero data is stored in a json object inside the app. What if you want CRUD functionality and need the hero data stored on a server? Right now the way you add data to Firestore is through the GUI that is very tedious.
Let’s upload the JSON file into Firestore
Tutorial
In this case I have json data that would be the menu for a restaurant.
[{"id":1,"name":"Focaccia al rosmarino","description":"Wood fired rosemary and garlic focaccia","price":8.50,"type":"Appetizers"},{"id":2,"name":"Burratta con speck","description":"Burratta cheese, imported smoked prok belly…