We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

handling nested JSON arrays

Comments

2 comments

  • Avatar
    Adrian Williams

    Here is a possible solution:

     

    Firstly, you can add a new output pin to the JSON Data node called "rows"

    This will have the effect of outputting the data rows elements as a set of records

    some of the field names have period '.' characters - this will cause issues later on in the processing so a Transform node and Change Metadata node are used to replace the period characters with underscores.

    An element id is then added to identify each element in a datarow.

    A Transform node then used to construct a dummy field name that incorporates the element id 

    This dummy field name is then used within a Pivot Data to Name node to transpose the 'rows_dataRow' values.

     

    A Modify Fields node can then be used to remove any unwanted fields.

     

    The example data flow is attached. You will require Analyze v.3.6.0 or higher to import it.

     

    Attached files

    Handling_Nested_JSON - 21 May 2020.lna

     

    0
    Comment actions Permalink
  • Avatar
    Gary Allemann

    Thank you Adrian - I have created this as a library node and tested it against two scenarios - it works for both. Appreciate it

    0
    Comment actions Permalink

Please sign in to leave a comment.