Go

Parse Json file to data structure

Photo by jet dela cruz on Unsplash

For example we have json file like:

This is the list of gene objects which consist “seqid”, “start”, “end”, “gene_name”.

To parse the json, simply use with json.Unmarshal and parse from the gene object.

Running main file will print the gene name:

U6
AC136352.3
AC136352.2
U6
AC171558.3
AC171558.1
AC171558.4
AC133551.1

Thanks for reading my post.

~~~PEACE~~~

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store