How to import json data into Firestore

Transfer old data into Google Firestore

Lucas Moyer
The Koi Life

--

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.

This will take too long

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…

--

--

Lucas Moyer
The Koi Life

I strive to wake up everyday and pursue what I find most interesting. Writer for The Startup. Owner of The Koi Life medium.com/lucas-moyer