Namespace: Restructor

datarestructor.Restructor

Main fassade for the data restructor as static function(s).

Source:

Example

var allDescriptions = [];
allDescriptions.push(summariesDescription());
allDescriptions.push(detailsDescription());
var result = datarestructor.Restructor.processJsonUsingDescriptions(jsonData, allDescriptions);

Methods

(static) datarestructor.Restructor.processJsonUsingDescriptions(jsonData, descriptions, debugMode) → {Array.<module:datarestructor.DescribedEntry>}

Static fassade function for the "Assembly line", that takes the jsonData and processes it using all given descriptions in their given order.

Parameters:
Name Type Description
jsonData object

parsed JSON data or any other data object

descriptions Array.<module:datarestructor.PropertyStructureDescription>

already grouped entries

debugMode boolean

false=default=off, true=write additional logs for detailed debugging

Deprecated:
  • since v3.1.0, please use "new datarestructor.Transform(descriptions).processJson(jsonData)".
Source:
Returns:
Type
Array.<module:datarestructor.DescribedEntry>