Nested loop to transform MongoDB results
It looks like you are basically doing a filter + flatMap. You can also use destructing:

var dict = _(this.data.userinfo).filter(Boolean).flatMap(info =&gt; {
  return info.weightdata.map(({name, value, weight}) =&gt; {
    return {name, value, weight};
  });
}).value();