Extract Asana Task Titles with jq 02 Dec 2013
I needed to extract a list of all task titles from an asana project. This is how I did it:
I exported the Project as JSON from within Asana.
Then I manipulated the returning JSON with jq, a command-line JSON processor.
I used this command
cat tasks.json | jq '.data[].name' | sed -e 's/^"//' -e 's/"$//'
The first command with jq
traverses the JSON to the data array and only returns the name attribute.
jq
returns a list of Strings with quoation marks.
The quotation marks are removed with a sed
command.
I found the sed
command in a stackoverflow question.