title: Reading data from Firebase, Importing JSON file to Firebase console which is a Array Structured - Android
body: <p>I'm having problem to read data from Firebase by Android. I have imported one JSON file to Firebase console which is long file (List of mobile manufacturing company's name and their respective mobile phone model names). <strong>Sample is like below</strong>.</p>
  
  <pre><code>[
    {
      "RetailBranding": "Google",
      "MarketingName": "Pixel",
      "Device": "sailfish",
      "Model": "Pixel"
    },
    {
      "RetailBranding": "Google",
      "MarketingName": "Pixel 2",
      "Device": "walleye",
      "Model": "Pixel 2"
    },
    {
      "RetailBranding": "Google",
      "MarketingName": "Pixel 2 XL",
      "Device": "taimen",
      "Model": "Pixel 2 XL"
    },
    {
      "RetailBranding": "Google",
      "MarketingName": "Pixel C",
      "Device": "dragon",
      "Model": "Pixel C"
    }
  ]
  </code></pre>
  
  <p>As you can see, It is a JSON file which is starting with an ARRAY. As mention <a href="https://www.tutorialspoint.com/firebase/firebase_arrays.htm" rel="nofollow noreferrer">here</a> FIREBASE does not support ARRAY directly (This is mention in Firebase official document as well), How can I read these data from Firebase.</p>
  
  <p>You can find out till what I have done.</p>
  
  <p><strong>Main2Activity.java</strong></p>
  
  <pre><code>    public class Main2Activity extends AppCompatActivity {
  
      private final String TAG = "mk";
      private DatabaseReference mDatabase;
  
      private EditText edt_search;
      private RecyclerView rv_brand_names;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main2);
  
          mDatabase = FirebaseDatabase.getInstance().getReference();
  
          edt_search = (EditText) findViewById(R.id.edt_search);
  
          RxTextView.textChanges(edt_search)
                  .debounce(500, TimeUnit.MILLISECONDS)
                  .subscribe(charSequence -&gt; {
                      pullOutTagsSuggestions(charSequence.toString());
                  });
      }
  
      public void pullOutTagsSuggestions(final String searchStr) {
  
          mDatabase.orderByChild("RetailBranding")
                  .startAt(searchStr)
                  .addValueEventListener(new ValueEventListener() {
                      @Override
                      public void onDataChange(DataSnapshot dataSnapshot) {
  
                          if (dataSnapshot != null) {
  
                              for (DataSnapshot suggestionSnapshot : dataSnapshot.getChildren()) {
                                  String suggestion = "" + suggestionSnapshot.child("RetailBranding").getValue();
                                  Log.e(TAG, "suggestion --&gt;" + suggestion);
                              }
                          }
                      }
  
                      @Override
                      public void onCancelled(DatabaseError databaseError) {
  
                      }
                  });
      }
  }
  </code></pre>
  
  <p>In above code I'm getting all the data not filtered data from Firebase database. Let me know If any further details required. Thanks in advance.</p>