Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. I have problem importing images of Json File into HTML Table

I have problem importing images of Json File into HTML Table

Scheduled Pinned Locked Moved JavaScript
jsonhtmlsharepointdata-structurescollaboration
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_15901519
    wrote on last edited by
    #1

    Hello, I successfully loaded the json responses into an HTML table. However, I am having a problem displaying the images of the json variables. I could only display the links. Here is the output:

    Home Team Match Date Away Team
    https://media-3.api-sports.io/football/teams/2939.png 2023-01-22T20:30:00+03:00 https://media-3.api-sports.io/football/teams/2934.png
    https://media-3.api-sports.io/football/teams/2938.png 2023-01-26T21:00:00+03:00 https://media-3.api-sports.io/football/teams/2939.png
    https://media.api-sports.io/football/teams/2931.png 2023-02-03T17:00:00+03:00 https://media.api-sports.io/football/teams/2939.png
    https://media.api-sports.io/football/teams/2937.png 2023-02-09T19:30:00+03:00 https://media-3.api-sports.io/football/teams/2939.png
    https://media-3.api-sports.io/football/teams/2939.png 2023-02-17T17:00:00+03:00 https://media-3.api-sports.io/football/teams/2936.png

    Here is a sample of the json file:

    array (
    'api' =>
    array (
    'results' => 10,
    'fixtures' =>
    array (
    0 =>
    array (
    'fixture_id' => 932017,
    'league_id' => 4633,
    'league' =>
    array (
    'name' => 'Pro League',
    'country' => 'Saudi-Arabia',
    'logo' => 'https://media-3.api-sports.io/football/leagues/307.png',
    'flag' => 'https://media-3.api-sports.io/flags/sa.svg',
    ),
    'event_date' => '2023-01-22T20:30:00+03:00',
    'event_timestamp' => 1674408600,
    'firstHalfStart' => NULL,
    'secondHalfStart' => NULL,
    'round' => 'Regular Season - 14',
    'status' => 'Not Started',
    'statusShort' => 'NS',
    'elapsed' => 0,
    'venue' => 'Mrsool Park',
    'referee' => NULL,
    'homeTeam' =>
    array (
    'team_id' => 2939,
    'team_name' => 'Al-Nassr',
    'logo' => 'https://media.api-sports.io/football/teams/2939.png',
    ),
    'awayTeam' =>
    array (
    'team_id' => 2934,
    'team_name' => 'Al-Ettifaq',
    'logo' => 'https://media.api-sports.io/football/teams/2934.png',
    ),
    'goalsHomeTeam' => NULL,
    'goalsAwayTeam' => NULL,
    'score' =>
    array (
    'halftime' => NULL,
    'fulltime' => NULL,
    'extratime' => NULL,
    'penalty' => NULL,
    ),
    ),

    And here is the code for impor

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups