Josh
Josh

Reputation: 33

Import Multiple JSON files in Firebase Database

In my project I have a recycler view which contains two items. First Item pulls data from a.json and second item pulls data from b.json file. In Firebase database I am able to pull data through only one JSON file and if I import another JSON file then first JSON file is getting deleted and first recycler view is throwing me a error. How to add two JSON file in the same Firebase project. Any information is highly appreciated.

Upvotes: 1

Views: 1582

Answers (1)

JeremyW
JeremyW

Reputation: 5272

It depends on what database structure you're looking to obtain.

  • The easiest situation here is if you are okay with creating two separate nodes, where you'd be able to implement this answer's suggestion by Google's own Frank van Puffelen.
  • However, if you want to "merge" the two data sets, I'm afraid you can't do that... at least not automatically, not with Firebase's import JSON feature. You could probably accomplish this using an existing online tool to combine them into *one* JSON file.

Upvotes: 1

Related Questions