How to plot results from trainer_state file?

Hello everyone,
I am trying to convert results in the trainer_state.json file to a specific format or data structure (dictionary) for the purpose of showing results for train_loss and loss_val
more details can be found here : opend_issue_on_stackoverflow