Skip to content

Instantly share code, notes, and snippets.

danbete / recurssive.tree.js
Created March 18, 2019 13:09 — forked from alonronin/recurssive.tree.js
Create recursive tree from json using lodash transform without recursion. Can have unlimited nesting.
View recurssive.tree.js
var _ = require('lodash');
var arr = [
{"name":"my2child1","title":"My 2 Child 1","parent":"my2"},
{"name":"my2child2","title":"My 2 Child 2","parent":"my2"},
{"name":"parent","title":"A single parent"},
{"name":"child-parent","title":"A child parent","parent":"child1"},
{"name":"child1","title":"Child 1","parent":"my"},
danbete /
Created March 7, 2019 09:09 — forked from staltz/
The introduction to Reactive Programming you've been missing