```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r}
#install.packages("rjson")
library(rjson)

result <- fromJSON(file = "/Users/xiaonili/Downloads/tcga-lusc-miRNA.json")

#print(result)

#get file names
filenames=unlist(lapply(result,function(x){x[[4]]}))
# alternative code
#filenames=unlist(lapply(result,function(x){x$file_name}))

#get case id number
caseid=unlist(lapply(result,function(x){x[[2]][[1]][[1]]}))

#match case id with file names
caseid2filename=data.frame(uuid=caseid,filename=filenames)
```


