Here are 3 sample events:
Note: these events are being pulled from a game database. This is test data being used to work with the MLTK for a project.
I need to be able to multiply the pricePerOne field by different numbers for all different items and take totals of that.
For example, the Knight Combat Rations can require 8 milk and 4 chicken meat to craft. So I need to know what 8 milk and 4 chicken meat cost and to compare that to 1 knight combat ration. But, other items might require different amounts of milk and chicken meat to craft or completely different items.
This should handle extraction and more neatly multiplying the pricePerOne field if you want it to always be multiplied by a constant. Since I don't know the exact structure of your JSON you might need to play around a bit with the spath command before you get the output how you want it, but I think this is a path that might work for you.
This is an example of one event currently:
I need to somehow tell my formula to look for the pricePerOne value for each individual item i need while excluding all the other items (there are hundreds of items in total) and then take a total value. Spath doesn't really seem to be that answer looking at the documentation.