Created
June 1, 2016 19:37
-
-
Save scottcorgan/0c3e96425e9a1a8733cf5c1aada48fca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Brute force way to create infinitely nested lists. | |
// What's a better way to model this and store in db? | |
[ | |
{id: 1, parenId: null}, | |
{id: 2, parenId: null}, | |
{id: 3, parenId: 2}, | |
{id: 4, parenId: 2}, | |
{id: 5, parenId: 1}, | |
{id: 6, parenId: 1}, | |
{id: 7, parenId: 1}, | |
{id: 8, parenId: null} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment