Skip to content
Advertisement

Load JSON File and print specific Parts

im building a simple webpage for school. Sadly ive got several problem. Im using an Apache Webserver with XAMPP.

I got a JSON-File like:

JavaScript

This file is on my Webserver too. I want to load this file especially with XHTML Request and then want to print several parts of this JSON File into HTML/PHP Code. I watched a lot of youtube videos but i dont get a way that works for me. I managed to load the JSON-File via XHTML and im able to print it in HTML, but it is always the whole JSON in the so called “responseText” and this is basically a large String for me. Im fairly new in this stuff so sorry if i mess things up.

So TLDR: load JSON file in webpage, print single parts of it in several HTML div tags. Im allowed to use html,php,js.

Advertisement

Answer

Something like this:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement