JObject or JsonArray combine

Hi,

I am processing an API query over 2 pages of 100 entries each. Is there an effective way to combine two JsonObjects into one JsonObject or with a JsonArray so that there is only one JObject or JsonArray to process which contains all 200 entries that I can work with? I’ve already tried several attempts that I found in the forum but I couldn’t get it to work because in the end the type didn’t always fit.

grafik

Hi @Crusha

Try this

JSonObject1.union(JSonObject2).ToArray

I hope it helps!!

Hi @Crusha

Check this thread

Hope it helps!!

I’ve already tried that, but unfortunately I get an error here

jsonoutput.union(jsonoutput2).ToArray

grafik

Hi @Crusha
var mergedJsonObject = JsonConvert.MergeObjects(jsonObject1, jsonObject2)

Try with this
Hope it helps!!

I get the same error with your method

grafik

@Crusha
What is the variable datatype given to mergedJsonObject

Regards

@Crusha

Once check and give variable type of mergeJsonOject is
Newtonsoft.Json.Linq.Jobject

Correct, I use the type Newtonsoft.Json.Linq.Jobject and this error keeps coming up. Also for the variable “mergedJsonObject”. This is so annoying

grafik

I’ll upload an example. Maybe someone will see the error based on my example.

jsontest - example.xaml (12.8 KB)