'Parse data from JSON field coming from PostgreS in AWS QuickSight

I am new to JSON as well as AWS QuickSight. I have a below JSON field (info) in one of the postgres table:

{"distributionchain":
[{"station":"U3340V","EntryDate":"2022-01-16T14:04:31","ExitDate":"2022-01-21T08:20:31","Sequence":1,"transitDuration":"NA","stationDuration":"4 days ,18 hours 16 minutes"},
{"station":"F0NEU1","EntryDate":"2022-01-22T15:56:31","ExitDate":"2022-02-25T19:00:31","Sequence":2,"transitDuration":"1 days ,7 hours 36 minutes","stationDuration":"34 days ,3 hours 4 minutes"},
{"station":"21255","EntryDate":"2022-02-25T21:26:31","Sequence":3,"transitDuration":"0 days ,2 hours 26 minutes","stationDuration":"NA"}],
"advisorsLeadtime":
{"advisorLeadtime":9900,
"advisorHandoverDate":"2022-03-16T08:00:31",
"advisorLeadtimeDuration":"15 days ,0 hours 0 minutes"},
"DeliveryDate":"2022-03-16T08:00:31",
"DeliveryLeadtime":66046,
"DeliveryLeadtimeDuration":"45 days ,20 hours 46 minutes",
"message":"Successfully calculated Distribution route leadtime from the historical analysis",
"estimatedStartDate":null,
"vomOrPpiStartDate":null,
"sourceData":2}

I want to parse the JSON in a way to have different columns like below:

station EntryDate ExitDate Sequence transitDuration stationDuration
U3340V 2022-01-16... 2022-01-21.. 1 NA 4 days ,18 hours 16 minutes

Tried using the parse function while adding a calculated field but it comes up blank all the times. What am I doing wrong? Any help on this is appreciated.

parseJson({info},"$.distributionchain.station")



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source