In a JSON file, how to set object value that is referred by another key : value pair in the same JSON file, (not in JAVA / any programming language).
"FRUIT_A":"Watermelon",
"FRUIT_B":"Mango",
"FRUIT_C":"Apple",
"FRUIT_D":"Grape",
// How to set the value with reference of another key.value.
"BIGGEST_FRUIT": ${FRUIT_A}, // <-- just a reference to explain what I want to achieve.
"SMALLEST_FRUIT": ${FRUIT_D}, // <-- another ref, don't know what notation.
Not sure, if it is possible to do within JSON file itself. From above example, I basically want to set the values of keys as below:
"BIGGEST_FRUIT": "Watermelon",
"SMALLEST_FRUIT": "Grape",
JSON is a simple text based file which stores data in key value format. If you want to refer value of another key then there has to be some resolver which will resolve the reference and provide you the expected value.
If you would like to know more on Please checkout this link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With