Looping through JSON properties

I have this for number #2

I had to put { } around it



// The short JSON file called "data.json" is parsed 
// in the code below. It must be in the project's "data" folder.

JSONObject json;

void setup() {

  json = loadJSONObject("data.json");

  JSONObject id = json.getJSONObject("blocks");

  println(id );
  println(id.size() );

  JSONObject animal1 = id.getJSONObject("vJb19r)WPw88AL7K#^ZI"); 

  println(animal1);

  //String species = json.getString("species");
  //String name = json.getString("name");
}
2 Likes