SiemensSEN
asked on
Parse json file to HTML table
Hello,
I json file with the following data:
I would like to parse it and display the content in an HTML table
E.G
Summary:
FILE CNT DUP
fileA 2 FileA1
FileA2
FileB 2 FileB1
FileB2
FileC 0
FileD 4 FileD1
FileD2
FileD3
FileD4
How can I parse the file to get the output. Also, is there better output format for the JSON file that would make creating the table easier.
Thanks for your help
I json file with the following data:
"Summary":"A test json file",
"uniq": {
"fileA": {
"Duplicates":"2",
"DuplicateFiles":[
{"File":"FileA1"},
{"File":"FileA2"}
]
},
"FileB": {
"Duplicates":"2",
"DuplicateFiles":[
{"File":"FileB1
{"File":"FileB2
]
},
"FileC": {
"Duplicates":"0",
"DuplicateFiles":[
]
},
"FileD": {
"Duplicates":"4",
"DuplicateFiles":[
{"File":"FileD1"},
{"File":"FileD2"},
{"File":"FileD3},
{"File":"FileD4},
]
}
}
}
I would like to parse it and display the content in an HTML table
E.G
Summary:
FILE CNT DUP
fileA 2 FileA1
FileA2
FileB 2 FileB1
FileB2
FileC 0
FileD 4 FileD1
FileD2
FileD3
FileD4
How can I parse the file to get the output. Also, is there better output format for the JSON file that would make creating the table easier.
Thanks for your help
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.