Forum Discussion

arvindnsn's avatar
arvindnsn
Contributor
7 years ago
Solved

How to create multiple hierarchy sets in for API output

Hello, I am having issues structuring the API output i am working in. I have attached both the Source data and the JSON output structure expected in the attachment. I have attached the source file ...
  • Aleksandar_A's avatar
    2 years ago

    Hello ashis1upreti,

    You can try by using the Date.parse() function in a Mapper Snap.

    In your case, as a second argument you need to provide the format in which the date is in.

    Date.parse("20240311113047","yyyyMMddhhmmss")

    Also, you can take a look at the Date.toLocaleDateTimeString() function if you want to format the date.

    Please let me know if this helps you.

    Regards,

    Aleksandar.