-3
Object
meta: Object
objects: Array[4]
    0: Object
    id: 19222
    leaguevine_url: "https://www.leaguevine.com/tournaments/19389/autumn-2013/pools/#19222"
    name: "D"
    resource_uri: "https://api.leaguevine.com/v1/pools/19222/"
    standings: Array[4]
        0: Object
        1: Object
        games_played: 0
        losses: 0
        plus_minus: 0
        points_allowed: 0
        points_scored: 0
        team: Object
        id: 21195
        leaguevine_url: "https://www.leaguevine.com/teams/21195/smokum/"
        name: "Smokum"
        resource_uri: "https://api.leaguevine.com/v1/teams/21195/"
        short_name: ""
        __proto__: Object
        team_id: 21195
        wins: 0
        __proto__: Object
        2: Object
        3: Object
            length: 4
    __proto__: Array[0]
    start_time: "2013-10-21T09:00:00+02:00"
    team_ids: Array[4]
    time_between_rounds: 120
    time_created: "2013-09-30T09:30:46.577758+00:00"
    time_last_updated: "2013-09-30T09:30:46.577791+00:00"
    tournament: Object
    tournament_id: 19389
    __proto__: Object
    1: Object
    2: Object
    3: Object

These are the JSON Objects I get from the Leaguevine API. How can I acces the Team name "Smokum"?

Besides using the Transparancy micro library to render my JSON objects to my HTML, but I don't know how to access objects in objects with Javascript.

Yarich94
  • 1
  • 3
  • They're not really *variables*; they're "items" or "values" or "dictionaries" or whatever, but not *variables*. – Erik Kaplun Oct 05 '13 at 15:58

1 Answers1

0

Say the JSON you posted is result, the property value Smokum can be accessed via:

result.objects[0].standings[1].name

leesei
  • 6,020
  • 2
  • 29
  • 51