I'm trying to build an archive off a feature service hosted in ArcGIS Online by getting the changes and writing them to a second hosted feature service.
I can get the changes in JSON, but I'm struggling to turn them back into usable features.
The format looks like this:
"edits" : [
{
"id" : 0,
"features" : {
"adds" : [
{
"geometry" : {
"x" : -119.58448584499996,
"y" : 32.10688862600006
},
"attributes" : {
"OBJECTID" : 93,
"GlobalID" : "1DF7CAF6-D3CC-4E8D-8FB3-C6714C06890A",
"IncidentName" : "Testing",
"Label" : "DIV X",
"Label2" : null,
"LabelType" : "Division",
"Other" : null,
"CreateName" : "test_nifc",
"CreateDate" : 1621322205148,
"EditName" : "test_nifc",
"DateCurrent" : 1621322205148,
"IRWINID" : null,
"FeatureAccess" : "Cooperators",
"FeatureStatus" : "Approved",
"IsVisible" : "Yes"
}
},
{
"geometry" : {
"x" : -119.59246936699998,
"y" : 32.08059610300006
},
"attributes" : {
"OBJECTID" : 91,
"GlobalID" : "463ABC0E-BB06-49D0-AA82-7FD1FA037141",
Using the JSON Reader I can set queries for each layer's "adds" and "updates" but that just returns one features with the attributes for all those features in it.
Any guidance would be greatly appreciated. I have been unsuccessful in adapting any of the examples I've found for parsing JSON.