Last active
May 9, 2018 16:22
-
-
Save rujmah/ee659230737468bf1977921d441ad50f to your computer and use it in GitHub Desktop.
Trello: Quick list from JSON using Node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// export json from trello board | |
const board = require('./path/to/trelloboard.json') | |
for(let list of board.lists){ | |
let listcards = board.cards.filter(c => c.idList === list.id ) | |
console.log(list.name) | |
for(let card of listcards){ | |
console.log(`\t${card.name} [${card.desc}]`) | |
} | |
} | |
/** | |
Output: | |
List A | |
Card 1 [desc here] | |
Card 2 [] | |
List B | |
Card 3 [more desc] | |
... | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change path at start of line | |
// copy&paste to node cli; | |
const board = require('./path/to/trelloboard.json'); for(let list of board.lists){ let listcards = board.cards.filter(c => c.idList === list.id ); console.log(list.name); for(let card of listcards){ console.log(`\t${card.name} [${card.desc}]`) } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment