So there is an array object, and you can load the array files in or sure import as JSON too. The idea is the recipes are listed in the array in whatever format you want so something like :
item 1 | amount 1 | item 2 | amount 2 | makes what
Then the crafting area relates to a separate array with the same structure, as you drop in items into slot 1, the item 1 and amount 1 updates, as you drop items into slot 2, the item 2 and amount 2 update.
When you click on 'craft', you compare this array with the recipe array to see if anything matches.
So if you drop in 2 wood and 2 stone, it would then look in the recipe array for
wood | 2 | stone | 2
and then this makes the item at column 5
Something like this would be my approach