I have a json template like the following:
[
{
"type":"foo",
"config":"{config}"
},
{
"type":"bar",
"arrConfig":"{arrConfig}"
}
]
While i have a backing model like:
{
"config": {
"test1": "value1",
"test2": "value2"
},
"arrConfig": [
"test3": {
"key1": "val1"
},
"test4": {
"key1": "val1"
}
]
}
I'm wondering if there are any node modules out there which will automatically take these two and transform the placeholders in the template. So the output would look like:
[
{
"type":"foo",
"config":{
"test1": "value1",
"test2": "value2"
}
},
{
"type":"bar",
"arrConfig": [
"test3": {
"key1": "val1"
},
"test4": {
"key1": "val1"
}
]
}
]