Set a variable in Storyline from a json script
Apr 20, 2016
Hi I am no coder so a need some help. A have a Google Spreedsheet with 2 columns. Name and Age. I want to get them into a variable in Storyline. I get the first part to work. Se below. If you paste this adress into a browser you se the code and the cell information.
To my problem. How should a write the code in storyline. This is the beginning...
$.getJSON('https://spreadsheets.google.com/feeds/list/1KobEpChm65uDTEOss9a7HHJ8DULdZ3gba-eUL7zWnpk/od6/public/values?alt=json', function(data) {
for (var i = 0; i < data.feed.entry.length; i++);
var id = data.feed.entry[i].gsx$name.$t;
var id = data.feed.entry[i].gsx$age.$t;
This part do a think work...but then? I want to have variables in storyline called name and age and that the name and age are filled in. Ides anyone?
name age
Kalle 27
Mia 52
2 Replies
Hi, Mikael -- Thanks for your question! While we are not able to provide support for JS coding, I did want to stop in to share this info sheet containing JavaScript Best Practices and Examples. Hopefully, one of the JS gurus in the community will be able to stop in to assist you further!
Thanks Christie, i hope so to ;-)
This discussion is closed. You can start a new discussion or contact Articulate Support.