Jump to content

I have a json data source as shown below. When I do  =ImportJSON("*my url to the data source*", "/Schedule/Teams/teamNumber", "noHeaders") in google sheets, i only get a list of 2585, 4355. Those teams are the first "teamNumber" in each of the "Teams". How can I get the ImportJSON function in google sheets to result with all 12 team numbers, instead of just the first one in each team?

 

 

{
  "Schedule": [
    {
      "description": "Qualification 1 (C)",
      "field": "Primary",
      "tournamentLevel": "Qualification",
      "startTime": "2016-04-08T09:00:00",
      "matchNumber": 1,
      "Teams": [
        {
          "teamNumber": 2585,
          "station": "Red1",
          "surrogate": false
        },
        {
          "teamNumber": 3545,
          "station": "Red2",
          "surrogate": false
        },
        {
          "teamNumber": 4610,
          "station": "Red3",
          "surrogate": false
        },
        {
          "teamNumber": 3743,
          "station": "Blue1",
          "surrogate": false
        },
        {
          "teamNumber": 57,
          "station": "Blue2",
          "surrogate": false
        },
        {
          "teamNumber": 2950,
          "station": "Blue3",
          "surrogate": false
        }
      ]
    },
    {
      "description": "Qualification 2 (C)",
      "field": "Primary",
      "tournamentLevel": "Qualification",
      "startTime": "2016-04-08T09:07:00",
      "matchNumber": 2,
      "Teams": [
        {
          "teamNumber": 4355,
          "station": "Red1",
          "surrogate": false
        },
        {
          "teamNumber": 6173,
          "station": "Red2",
          "surrogate": false
        },
        {
          "teamNumber": 4328,
          "station": "Red3",
          "surrogate": false
        },
        {
          "teamNumber": 4155,
          "station": "Blue1",
          "surrogate": false
        },
        {
          "teamNumber": 5829,
          "station": "Blue2",
          "surrogate": false
        },
        {
          "teamNumber": 3345,
          "station": "Blue3",
          "surrogate": false
        }
      ]
    }
}

 

Link to comment
https://linustechtips.com/topic/642894-importjson-google-sheets-help/
Share on other sites

Link to post
Share on other sites

Json is not valid you're missing a ]

 

{
	"Schedule": [{
		"description": "Qualification 1 (C)",
		"field": "Primary",
		"tournamentLevel": "Qualification",
		"startTime": "2016-04-08T09:00:00",
		"matchNumber": 1,
		"Teams": [{
			"teamNumber": 2585,
			"station": "Red1",
			"surrogate": false
		}, {
			"teamNumber": 3545,
			"station": "Red2",
			"surrogate": false
		}, {
			"teamNumber": 4610,
			"station": "Red3",
			"surrogate": false
		}, {
			"teamNumber": 3743,
			"station": "Blue1",
			"surrogate": false
		}, {
			"teamNumber": 57,
			"station": "Blue2",
			"surrogate": false
		}, {
			"teamNumber": 2950,
			"station": "Blue3",
			"surrogate": false
		}]
	}, {
		"description": "Qualification 2 (C)",
		"field": "Primary",
		"tournamentLevel": "Qualification",
		"startTime": "2016-04-08T09:07:00",
		"matchNumber": 2,
		"Teams": [{
			"teamNumber": 4355,
			"station": "Red1",
			"surrogate": false
		}, {
			"teamNumber": 6173,
			"station": "Red2",
			"surrogate": false
		}, {
			"teamNumber": 4328,
			"station": "Red3",
			"surrogate": false
		}, {
			"teamNumber": 4155,
			"station": "Blue1",
			"surrogate": false
		}, {
			"teamNumber": 5829,
			"station": "Blue2",
			"surrogate": false
		}, {
			"teamNumber": 3345,
			"station": "Blue3",
			"surrogate": false
		}]
	}] <-- here
}

 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×