In search of a solution similar to what was provided for JavaScript in this thread, I am now attempting to achieve the same outcome using C# with a C# object, rather than JSON.
The JavaScript resolution appears as follows:
myObject.myObject.forEach(arr => {
arr.prop = arr.parameters.reduce((res,obj)=> res+obj.special, '')
})
Hence, I tried to replicate it like so in C#:
foreach (array arr in myObject.myObject)
{
arr.prop = arr.parameters.reduce();
}
Unfortunately, I have not been able to locate an equivalent function such as JS reduce
in C#.
Are there any suggestions on how to tackle this issue?