I can\'t figure out how to concatenate two JArrays that I got be using JArray.Parse? The order of the arrays must be preserved i.e. the first array should be first and eleme
My two cents for the generic case where you have n
JArray
's:
IEnumerable jarrays = ...
var concatenated = new JArray(jarrays.SelectMany(arr => arr));
And to project this onto the original question with two JArray
's:
JArray jarr0 = ...
JArray jarr1 = ...
var concatenated = new JArray(new[] { jarr0, jarr1 }.SelectMany(arr => arr));