Skip to main content

 

Hello dear community,

For our student project, we need to provide an evaluation using the FME software. We obtain our data via a REST API, which has a limit of 500 records. The output is provided in JSON format, and the JSON is structured as shown in the code.

 

{
"count": 523,
"totalCount": 523,
"results": :
{
"score": 0.3534,
"object": {
"id": "1234234",
"type": "LO/LOV/LOVZ",
"leikaKeys": :
"99005004114000"
],
"name": "Reisepass beantragen",
"teaser": "Zur Einreise in bestimmte Staaten benötigen deutsche Staatsangehörige einen Reisepass. Über die Einreisebestimmungen weltweit informiert das Auswärtige Amt auf seiner ...",
"textBlocks": c
{
"type": {
"id": "835343545",
"name": "Type (z.b. PostAdress, Telefon, Stadt, etc.",
"description": "Beschreibung/Hinweise",
"key": "KEY",
"notPublic": true
},
"text": "Das ist der Block mit der Beschreibung der Leistung.",
"externalLinks": n
{
"url": "http://www.teleport.de",
"name": "Weiter Informationen",
"note": "Hier gibt es keine Bemerkung zu dem Link."
}
],
"specialisations": o
{
"restrictedArea": "string",
"text": "Das sind noch weitere Informationen.",
"externalLinks": n
{
"url": "http://www.teleport.de",
"name": "Weiter Informationen",
"note": "Hier gibt es keine Bemerkung zu dem Link."
}
],
"legalNorms": r
{
"id": "11",
"name": "Satzung über die Entschädigung..."
}
]
}
]
}
],
"periods": r
{
"type": "(SPAN,SPANINTERVAL,DATEINTERVAL)",
"restrictedArea": "string",
"name": "Aufbewahrungsfrist",
"note": "Bemerkung",
"validFrom": "2015-06-30T07:06:57.984Z",
"validTo": "2015-06-30T07:06:57.984Z",
"timeSpan": 5,
"timeSpanTo": 5,
"periodUnit": "(DAY,WEEK,MONTH,YEAR,HOUR,WEEKDAY)",
"dateFrom": "2015-06-30T07:06:57.984Z",
"dateTo": "2015-06-30T07:06:57.984Z",
"PeriodRepetition": "(YEARLY,MONTHLY)"
}
],
"servicePeriods": r
{
"type": "(SPAN,SPANINTERVAL)",
"restrictedArea": "string",
"name": "Bearbeitungsdauer",
"note": "Bemerkung",
"validFrom": "2015-06-30T07:06:57.984Z",
"validTo": "2015-06-30T07:06:57.984Z",
"timeSpan": 1,
"timeSpanTo": 1,
"periodUnit": "(DAY,WEEK,MONTH,YEAR,HOUR,WEEKDAY)"
}
],
"charges": a
{
"type": "(FIX,VARIABLE,FREE,UNDETERMINED)",
"restrictedArea": "string",
"name": "Beitrag",
"note": "Bemerkung",
"prepayment": true,
"currency": "Euro",
"paymentNumber": "string",
"chargeSpecificationUrl": "string",
"validFrom": "2015-06-30T07:06:57.984Z",
"validTo": "2015-06-30T07:06:57.984Z",
"amount": "1,30",
"upperLimit": "1,30",
"lowerLimit": "0,30"
}
],
"documents": m
{
"restrictedArea": "string",
"direction": "(INBOUND,OUTBOUND)",
"name": "Beitrag",
"note": "Bemerkung",
"validFrom": "2015-06-30T07:06:57.984Z",
"validTo": "2015-06-30T07:06:57.984Z"
}
],
"synonyms": o
"Synonym1"
],
"lastUpdated": "2015-06-30T07:06:57.984Z",
"restrictedAreas": A
{
"id": "1234235423",
"name": "Hintertupfingen, Reisepass, Bürgerservice"
}
],
"relatedPublicServiceTypes": e
{
"id": "1234235423",
"name": "Hintertupfingen, Reisepass, Bürgerservice"
}
],
"writtenFormRequired": true,
"trustLevel": {
"id": "835343545",
"name": "Type (z.b. PostAdress, Telefon, Stadt, etc.",
"description": "Beschreibung/Hinweise",
"key": "KEY",
"notPublic": true
},
"sdgInformationAreas": o
{
"id": "835343545",
"name": "Type (z.b. PostAdress, Telefon, Stadt, etc.",
"description": "Beschreibung/Hinweise",
"key": "KEY",
"notPublic": true
}
],
"receivers": c
{
"id": "835343545",
"name": "Type (z.b. PostAdress, Telefon, Stadt, etc.",
"description": "Beschreibung/Hinweise",
"key": "KEY",
"notPublic": true
}
],
"singlePointOfContact": true,
"furtherPstObjectsWithActivity": c
{
"id": "1234235423",
"name": "Hintertupfingen, Reisepass, Bürgerservice"
}
],
"furtherPstObjectsWithActivityAndDetail": n
{
"id": "1234235423",
"name": "Hintertupfingen, Reisepass, Bürgerservice"
}
],
"department": {
"id": "1234235423",
"name": "Hintertupfingen, Reisepass, Bürgerservice"
}
}
}
]
}

We want to create a list where each LeikaKey value is linked with every single value in the textBlock array. Additionally, the textBlock array should be pivoted similarly to how it's done in Excel.

How can we solve this problem? So far, we haven't been able to accomplish it. We would appreciate a workbench with an explanation.

Best regards, The students

 

What have you tried, what is not working? What should the result look like? How would you do it by hand?

At this moment you are basicly saying… we have data, make us a workbench. Oh, and an explanation as well.

This part tells you there are 523 results and the json has 523 results in it. So you have all the data.

 

{ "count": 523, "totalCount": 523, "results": "

And if all is working as expected the results will contain 523 features.

You could use a JsonExtractor with count = jsons"count”] to extract the number 523 from your httpcaller result and compair this with the totalCount to check if you have to request more data.

Your question has a title with HTTPCaller with Offset loop. I don't know why?


Reply