Makeing a variabel inside a .json

this is the scenario
“components”: {
“stonehearth:attributes”: {
“mind”: {
“type”: “random_range”,
“base”: 12,
“max”: 12
},
“body”: {
“type”: “random_range”,
“base”: 12,
“max”: 12
},
“spirit”: {
“type”: “random_range”,
“base”: 12,
“max”: 12
},
“sleep_duration”: {
“type”: “derived”,
“equation”: “140 - 1.8 * diligence/(12*(10+9))”,
“min”: 60
}
}
}
that’s that code. there are 7 “12” so I was wondering if I could do something like replace all the “12” with “X”
and add
var X = 12
then I could be one step closer to making a version of this mod where when you activate the mod it will ask you what you want max stat to be you type any number you want so I don’t have to create a mod version for every value that someone would want.

then i would have

var X = ans

JSON is a data-only format, so I don’t think you can do what you want with JSON alone. You’ll need some javascript or lua.