I need help figuring out how to query a database array where values equals one or more values from an input array
my main realtime-database structure looks like this:
dbName
pushId
categories (array)
index (need wildcard)
label (string i need to match)
value (pushID from other db)
now, my problem is i cannot figure out how to get through all the children from the root - through an unknown number of category indexes - to finally find matches for each of the string in my inputArray in each of the db items...
const dbRef = ref(getDatabase(), 'dbName');
search.forEach(async (option) => {
const searchQuery = query(dbRef,
child('categories'), // this doesn't work!
orderByChild('label'),
equalTo(option.label),
);
...
i origianally had the array as a comma ',' separated string, but the realtime-database only allows matching string equally, so i ditched that approach.
please help me