Hello All,
I stumbled upon a requirement this morning and would like some help/suggestions to work ahead on the solution. I am looking for a way to copy an object inside an array for 36 times while incrementing a specific key inside the object which is a date field.
Example Input:
[
{
"valueName": "ABC",
"date": "01/01/2021",
"someKey": "someValue"
},
{
"valueName": "XYZ",
"date": "05/01/2021",
"someKey": "someValue"
}
]
Example Output:
[
{
"valueName": "ABC",
"date": "01/01/2021",
"someKey": "someValue"
},
{
"valueName": "ABC",
"date": "02/01/2021",
"someKey": "someValue"
},
.
.
.
**Copied 36 times with only the month part getting incremented for 36 times**
{
"valueName": "XYZ",
"date": "05/01/2021",
"someKey": "someValue"
},
{
"valueName": "XYZ",
"date": "06/01/2021",
"someKey": "someValue"
}
.
.
.
**Copied 36 times with only the month part getting incremented for 36 times**
]
Only the date key will be incremented each time the object is copied, date key is following a date format of “MM/dd/yyyy” and only MM has to be incremented.
Please advise how this can be achieved using SnapLogic.