Skip to content

Instantly share code, notes, and snippets.

@mrmemmo
Created March 5, 2019 21:27
Show Gist options
  • Save mrmemmo/33573bcbe5fc650e18587a9c280c1a4c to your computer and use it in GitHub Desktop.
Save mrmemmo/33573bcbe5fc650e18587a9c280c1a4c to your computer and use it in GitHub Desktop.
//after the for loop add these lines to get the key information about the stock
JSONObject jarr = JSONObject.parse(lines);
JSONObject stock = jarr.getJSONObject(sym);
int price = stock.getInt("Price");
String beta = stock.getString("Beta");
String name = stock.getString("companyName");
println(price + ", " + beta + ", " + name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment