The JSON examples I gave above are the basic format to define the data structures you need. Try to read up on JSON to grasp the basic concepts of what JSON object and array is :)
It's never advisable to manually manipulate your data. Instead, use the scripting API to do this for you.
But from what I understand right now about what want to do, you're more concerned with representing these values, as opposed to manipulating them within your game, am I correct?
If so, you don't necessarily need to use JSON. JSON works best for when you need to represent a collection or map of properties or values.
If your list of stats isn't that particularly long, why not just represent every stat and sub-stat in a 1:1 manner?
For example:
head armor vs. physical attack = 3
head armor vs. magical attack = 1
etc etc.
Of course you can shorten your keys (e.g. head armor vs. physical attack) into an acronym like HAVPA or anything you'd like. Then you can use the property name in-game, to pull up its associated value
Due to existing constraints, we don't usually help much in writing macros, as there too many ways to write them, and we restrict ourselves to helping out with users write themselves. I hope you understand.