Thank you @Federico_Stefanato for the thought and comment on this!
The reason that I’m having to work this way around is that I have access to a list of 16,000 different ingredients/meals with the nutrient breakdown already provided (e.g. the exact amount of vitamins for each item), and in that list, they have put things like ‘Plain yogurt’, rather than just ‘yogurt’, whereas, when a user comes to submit their meal, they’re more likely to put just ‘yogurt’
So my goal is to create a simple system here which provides the user with a ‘best guess’, listing the most likely match and then, the user can either accept it with one click, or reject and manually perform a search to find the right answer.
I think this piece is the final piece of the puzzle because, as you can see from the embedded above, I’ve got it performing all the other functions, I just need to figure out a way to get it to run a search on the item (e.g. yogurt) and then I think it’s all there
Please do let me know if that makes sense or if you have any other ideas on how to achieve this, as it’s all very much appreciated!