简体   繁体   中英

get Key->Value in json Array in Google apps Script

In Google Apps Script I am getting an array of JSON objects. If I want to access the key value pair of "id: value" could I simple do the following?

 var id = myArrayofJson[0].id;

I would use jQuery but it's not allowed in the Google Api.

what I had was an array of json objects so the answer for my question was:

for(i=0; i < myArray.length; i++){
  var receive = myArray[i][jsonId][anotherId];
 }

I just didn't know how to use json arrays properly but got the help from you and others. thank you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM