HI i Have a json data file i need to extract the data from. I'm struggling with objects etc. This is the file:
{
"type": "Annotation",
"body": [
{
"type": "TextualBody",
"value": "Value No 1",
"purpose": "commenting",
"creator": {
"id": "2100",
"name": "James Smith"
},
"created": "2021-10-07T15:30:38.358Z",
"modified": "2021-10-07T15:30:38.452Z"
},
{
"type": "TextualBody",
"value": "Value No 2",
"purpose": "commenting",
"creator": {
"id": "2400",
"name": "Paul Davies"
},
"created": "2021-10-07T15:50:15.252Z",
"modified": "2021-10-07T15:50:15.699Z"
}
],
"target": {
"source": "http://localhost:51583/Pages/Info/185.jpg",
"selector": {
"type": "FragmentSelector",
"conformsTo": "http://www.w3.org/TR/media-frags/",
"value": "xywh=pixel:1509.8331298828125,423.9666748046875,1223.5999755859375,445.433349609375"
}
},
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "#e719c51d-7096-4c0c-b4db-719fda585219"
}
I would like to extract the data so i can put to screen/write to separate SQL database etc (i can do this).
I would like to get:
Value No 1, 2100, James Smith
Value No 2, 2400, Paul Davies
What I have tried:
Have tried all sorts of parsing. I can paste my existing code here but i've changed it so much i'm not sure where to begin anymore. Not sure best approach. Any code/pointers would be gratefully received. Any good resources i can research? Many Thanks!