I'm trying to write a little script, which gets me the name of a tag and it's ID out of Asana. I've an original array structured like this:
"data":[{"id":"27724930904,"gid":"27724930904","name":"Tag1"},
{"id":"26724930954,"gid":"26724930954","name":"Tag2"},
{"id":"26109930621,"gid":"26109930621","name":"Tag3"}]}
The goal is, to get two arrays like this:
var tagName = ["Tag1", "Tag2", "Tag3"];
var tagID = ["27724930904", "26724930954", "26109930621"];
The "gid"-number is not needed. It would be great, if the script would get the original array directly from it's URL (https://app.asana.com/api/1.0/tags).
I'm quite new in javascript and even struggling to get the original array from the URL.
Any hints how this could work? Thanks for your help guys.