slm-components/collection/components/gallery/gallery.js
/**
     * This function is responsible to load the data from the json file (as requested) and parce the results
     * to print them inside the gallery
     */
This function is responsible to load the data from the json file (as requested) and parce the results
to print them inside the gallery
This function is responsible to load the data from the json file ( as requested ) and parce the results to print them inside the gallery
componentDidLoad() {
        fetch("../../assets/data/data.json")
            .then(res => res.json())
            .then(parsedRes => {
            this.JSON_results = parsedRes.map(match => {
                return { title: match.title, path: match.path };
            });
        })
            .catch(err => {
            console.log(err);
        });
    }
componentDidLoad ( ) { fetch ( "../../assets/data/data.json" ) . then ( res => res . json ( ) ) . then ( parsedRes => { this . JSON_results = parsedRes . map ( match => { return { title : match . title , path : match . path } ; } ) ; } ) . catch ( err => { console . log ( err ) ; } ) ; }
This function is responsible to load the data from the json file (as requested) and parce the results
 to print them inside the gallery
This function is responsible to load the data from the json file ( as requested ) and parce the results to print them inside the gallery