Also need to know how to hide a few from search for restrictions.
Such as level or if recipe isn't unlocked yet.
An example Capx would be great, but an explanation would work as well.
I am thinking I will need a XML/JSON for the craft that has the recipe and a XML/JSON for each ingredient that has the names of the crafts the ingredient is in.
Would I do Category the same? How would I show the recipe list in alphabetical order?
While XML has a higher learning curve and is more of a pain to modify (I wrote an excel macro just to convert tables into the desired XML text output), it would be faster and easier to implement all the other functionality you want for this with XML. The reason for that is XPath queries. For JSON I think you would need to setup custom logic to get query-like functionality which you need for the recipe system features you desire (hiding unavailable recipes). Depending on what you need and how you organize the data, it can be more of a hassle but maybe that's just my ignorant opinion. I always used XML for these kinds of game databases (mostly for items, but not only).
If you are already familiar with XML and XPath queries I would suggest XML as it will result in less stuff to debug within C2. Issue with it is human-readability, preparing the file itself and getting the XPath queries right.
If I would be doing a system such as yours (actually I will need to do one, but probably after I get the skill trees fully working and combat turn logic working). I would do it as below:
1) All recipes are stored within one XML file database. Every recipe is a single <recipe> element. The <recipe> element should have an attribute called "Output" and "OutputQuanity", these would define the item created and the quantity of the item created. You can also have additional attributes such as "Type", "ClassNeeded", "LevelNeeded" so that you can narrow down and filter the recipe list via XPath easily.
Under each <recipe> element you would have <ingredient> child element. These <ingredient> elements should have an attribute called "QuantityNeeded". That would define how much of the ingredient would be needed to create one output batch of items.
2) Now the hard part. What is an ingredient and how to check for it? There are two approaches here I can think of. The easy one is "each ingredient is a unique item", think WoW crafting. Then you just need to check the relevant inventory object (probably an array) with the player's items for the item named as the ingredient. If you are getting crafting materials directly from the natural source or resource nodes (mining copper veins, chopping trees for wood etc.). In this case the ingredients themselves would be listed with all the other items in an item XML object.
The hard approach is what Fallout 4 did (yes, that game actually managed to not take the easy route with some RPG-ish mechanics, shocking I know), have ingredients not exist only as items, but as properties of other items. Say a telephone is made out of some copper and plastic. So basically allow breaking down junk items into components. This system is more realistic and depending on the theme of the game (in Fallout 4's case, a post-apocalyptic world of jury-rigging and salvage prospecting) may fit better. In this case your item system would need to be amended with data on what and how can be broken down into what. Also you would might want to add some logic to allow automatic breaking down of junk items when crafting a specific recipe, but that would also require additional logic to identify what can be broken down.
3) Regardless of a picked approach at the end you need to show the available recipes via the games GUI, as a list. You will need an array. What I would do is fill this array using an xml object and the "for each node" condition, after entering an xpath query. So on a list refresh the array would have its width set to 0, next the query would be entered (you can build this dynamically out of function parameters with some text string appending) and the array would be filled by entering a new array X element for each node of the XML file returned by the XPath query. The main issue here really is setting up the XPath queries correctly. XPath is quite powerful but it is easy to make a mistake and get a broken query that does nothing, especially when building the XPath query dynamically based on function paremeters.
4) Finally once the use selects one of the listed recipes (or for all visible recipes), you will need to use the XPath to the particular recipe (or for each recipe), get its components and check if they are in the required quantity in the player's inventory.