I have problems with writing a universal function in node that would parse JSON like this:
{
"parserId": 1,
"filters": [
{
"filterName": "replaceTitle",
"regex": "..."
},
{
"filterName": "replaceRegion",
"regex": "..."
}
]}
into multiple JSON like this:
{ "parserId": 1, "filterName": "replaceTitle","regex": "..." },{ "parserId": 1, "filterName": "replaceRegion", "regex": "..."}
It would be great if this function would be universal so doesn't matter what are the names of the fields in JSON, as long as it's build the same way. Is there any node package already doing it? Thank you for your help!