I am making an app that get the ingredients than displays the recipes that can be made from those ingredients.The recipes will be stored in fire-base. The structure that i am thinking of going with looks like this:
{
"description" : "Some description",
"name" : "Recipe name",
"idRecipe" : 1,
"ingredients" : {
"ingredient1" : "tomato",
"ingredient2" : "pepper",
.
.
.
"ingredient10": "cheese",
},
"numOfPersons" : 2,
}
How can i 'query' the recipes with the matching ingredients,or should the structure be of recipe be changed?