Attempting to process the an incoming json post but ran into an issue with nested json array. Im unable to use field mapping to take the nest elements of observations to a flat geodefinition used for a feature service output.
Issue is only with JSON array section, as the nest json for survey result are able to different feature service with flat geodefinition.
Any insight on what I may have wrong or limitations I may be hitting?
Solved! Go to Solution.
First off there appears to be an error in the JSON array you posted (extra comma at the end of the array data just before the closing ']', but I'll assume that is just an editing error when you created the sample.
Pulling in a JSON sample similar to yours, I was able to use a field mapper to map the two grouped array values out to a flat schema (see FieldMapper settings below). But this assumes your array will always be the same size.
If your array is always going to be different sizes or if you would like to convert each array item into a separate event, you will want to use the Multicardinal Field Splitter Processor. This processor element will create a new GeoEvent for each array member, flattening the schema in the process.
First off there appears to be an error in the JSON array you posted (extra comma at the end of the array data just before the closing ']', but I'll assume that is just an editing error when you created the sample.
Pulling in a JSON sample similar to yours, I was able to use a field mapper to map the two grouped array values out to a flat schema (see FieldMapper settings below). But this assumes your array will always be the same size.
If your array is always going to be different sizes or if you would like to convert each array item into a separate event, you will want to use the Multicardinal Field Splitter Processor. This processor element will create a new GeoEvent for each array member, flattening the schema in the process.
Yup you are correct, the "," is due to the fact that json is only an excerpt of a larger post. And appreciate you pointing me to this processor. This is exactly what I needed!