Last active
November 4, 2016 17:17
-
-
Save tanyagupta/3c8ea43ca87a8dba648d7a67867c6f3c to your computer and use it in GitHub Desktop.
Accessing heterogenous JSON data (using or) - Part 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_or(){ | |
var cars=[ | |
{make: "Jeep",model: "Cherokee",trim:"Sport 4dr Front-wheel Drive",year:"2016", | |
wheel:{wheel_size:"17 x 7.5",wheel_metal:"Aluminum"}}, | |
{make: "Jeep",model: "Wrangler",trim:"Sahara 2dr 4x4",year: "2015"} | |
] | |
for (var i in basic){ | |
Logger.log(cars[i]["wheel"] || "") // Logger.log() is Google App Script's console.log | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment