Forum Discussion

adam_gataev's avatar
adam_gataev
New Contributor II
2 years ago
Solved

Creating complex nested JSON from CSV file

I am reading a CSV/XLSX file (could be an sql table as well) with the follwing structure (file attached below as well): Branch Year Type ParentNumber CurrentNumber Structure Level Language...
  • dimitri_hristov's avatar
    6 years ago

    Hi @Henchway,

    I assumed that $…questions is a JSON Object. So for this input to the Mapper Snap:
    ,

    I entered this expression in the Mapper:

    $entity.value.design.questions.filter((value,key)=>value.label == "Target Application ID").keys()

    and assigned it to the $key field. I then got this in the Mapper’s output:

    If I am incorrect in my assumptions, perhaps you can provide us with sample input data you need processed in a textual format, so that I’d be able to work with that.

    BR,
    Dimitri