{
"painting" : [ {
"authorId": 1,
"created": "1850",
"id": 1,
"imageUrl": "./img1.png",
"locationId": 1,
"name": "The ninth wave",
"key" : "img1"
},
{
"authorId": 2,
"created": "1747",
"id": 2,
"imageUrl": "./img2.png",
"locationId": 2,
"name": "L`Enlévement d`Europe",
"key" : "img1"
},
{
"authorId": 3,
"created": "1472",
"id": 3,
"imageUrl": "./img3.png",
"locationId": 3,
"name": "Annunciation"
},
{
"authorId": 4,
"created": "1892",
"id": 4,
"imageUrl": "./img4.png",
"locationId": 4,
"name": "Evening on Karl Johan Street"
},
{
"authorId": 5,
"created": "1662",
"id": 5,
"imageUrl": "./img5.png",
"locationId": 5,
"name": "Syndics of the Drapers' Guild"
},
{
"authorId": 2,
"created": "1746",
"id": 6,
"imageUrl": "/img6.png",
"locationId": 6,
"name": "The Toilet Of Venus"
}
)
import React, {Component} from 'react' import PaintingsData from './db.json'
var paintings = PaintingsData.painting;
class Paintings extends Component {
render(){
return(
<ul>
{
paintings.map((s) => {
return (
<div>
<div><img src={s.imageUrl} alt={s.name}/></div>
</div>
)
})
}
</ul>
)
}
}
export default Paintings